linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* .../asm-i386/bitops.h  performance improvements
@ 2005-06-15  8:53 cutaway
  2005-06-15 12:18 ` Gene Heskett
  2005-06-15 15:34 ` Maciej W. Rozycki
  0 siblings, 2 replies; 14+ messages in thread
From: cutaway @ 2005-06-15  8:53 UTC (permalink / raw)
  To: linux-kernel

In find_first_bit() there exists this the sequence:

shll $3,%%edi
addl %%edi,%%eax

LEA knows how to multiply by small powers of 2 and add all in one shot very
efficiently:

leal (%%eax,%%edi,8),%%eax


In find_first_zero_bit() the sequence:

shll $3,%%edi
addl %%edi,%%edx

could similarly become:

leal (%%edx,%%edi,8),%%edx




^ permalink raw reply	[flat|nested] 14+ messages in thread
[parent not found: <4fB8l-73q-9@gated-at.bofh.it>]

end of thread, other threads:[~2005-06-16  7:10 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-15  8:53 .../asm-i386/bitops.h performance improvements cutaway
2005-06-15 12:18 ` Gene Heskett
2005-06-15 13:06   ` Richard B. Johnson
2005-06-15 19:18   ` cutaway
2005-06-15 15:34 ` Maciej W. Rozycki
2005-06-15 23:48   ` cutaway
     [not found] <4fB8l-73q-9@gated-at.bofh.it>
     [not found] ` <4fF2j-1Lo-19@gated-at.bofh.it>
2005-06-15 14:57   ` Bodo Eggert
2005-06-15 15:30     ` Maciej W. Rozycki
2005-06-15 16:06       ` Richard B. Johnson
2005-06-15 16:29         ` Maciej W. Rozycki
2005-06-15 19:10           ` Bodo Eggert
2005-06-16  3:26             ` Stephen Rothwell
2005-06-16  7:10             ` Mikael Pettersson
2005-06-15 23:53     ` cutaway

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).