From owner-freebsd-hackers Wed Jun 27 10: 6:39 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from gull.mail.pas.earthlink.net (gull.mail.pas.earthlink.net [207.217.121.85]) by hub.freebsd.org (Postfix) with ESMTP id 1139537B401; Wed, 27 Jun 2001 10:06:36 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from mindspring.com (dialup-209.245.141.189.Dial1.SanJose1.Level3.net [209.245.141.189]) by gull.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id KAA01047; Wed, 27 Jun 2001 10:06:34 -0700 (PDT) Message-ID: <3B3A12BB.30EB8D80@mindspring.com> Date: Wed, 27 Jun 2001 10:07:07 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: 3d@FreeBSD.ORG Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: swapping bytes, fpos_t References: <20010626130659.400C437B405@hub.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Marc van Woerkom wrote: > > Hi, > > while porting the ogle dvd player I faced the > problem of needing fast byte swap routines for > 16, 32 and 64 bit words. > > After grepping through the -CURRENT sources > I came up with at least three different > assembler implementations. The networking implementations tend to be fastest, and are clever. On certain architectures (e.g. Transputer, which has a barrel shifter), the assembly versions are going to be faster, even at the cost of a function call overhead, which the macro versions don't have. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message