Faster TlsAlloc() or zero_bit_scan

Mike Hearn mh at
Thu Feb 10 14:12:39 CST 2005

On Thu, 10 Feb 2005 18:59:21 +0100, Dietrich Teickner wrote:
> I have a suggestion for a faster implementation of the zero_bit_scan in
> RtlFindClearBits	[NTDLL.@]
> (rlbitmap.c) for e.g. TlsAlloc()
> The main is the usage of the instruction 'bsf  eax, eax'
> This I have implemented in the new experimental odinxp-tree for finding 
> the first zero_bit in the first 'bytecount' bytes of the bitmap addr.

Does this actually make a noticeable difference? Rewriting stuff in
assembly for theoretical performance improvements isn't so great, as far
fewer people can read/write assembly than C.

thanks -mike

More information about the wine-devel mailing list