Subject: Re: Faster TlsAlloc() or zero_bit_scan

Dietrich Teickner dietrich_teickner at
Fri Feb 11 12:06:02 CST 2005

Not all You can every write in c/c++. Sometime You need a call for a
library function. I think, that can be one and I think, not only
TlsAlloc use a zero_bit_scan.

It must be
first zero_bit in the first 'bytecount' DWORD from the bitmap addr.


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