On Fri, Mar 23, 2007 at 09:29:05AM -0400, Doug Gregor wrote: > On 3/23/07, Kaveh R. GHAZI <[EMAIL PROTECTED]> wrote: > >When I brought up the 16-bit option earlier, Jakub replied that x86 would > >get hosed worse because it's 16-bit accesses are not as efficient as it's > >8 or 32 bit ones. > > > >http://gcc.gnu.org/ml/gcc/2007-03/msg00763.html > > > >I assume you tested on Darwin? Can you tell me if it was ppc or x86? > > I tested on x86 (i686-pc-linux-gnu; processor is an Intel Core 2 Duo > E6600) and found a 1% slowdown with 16-bit codes vs. 8-bit codes.
Gcc isn't very efficient on bitfield operation. The main issue is SLOW_BYTE_ACCESS. It is poorly documented and implemented: http://gcc.gnu.org/ml/gcc-patches/2006-08/msg00885.html http://gcc.gnu.org/ml/gcc-patches/2006-09/msg00029.html http://gcc.gnu.org/ml/gcc-patches/2006-10/msg00705.html Change to SLOW_BYTE_ACCESS on x86 will make some bitfield operations to go faster while slown others. I believe Apple has some testcases for it. I may also have some testcases. H.J.