[webkit-reviews] review granted: [Bug 212032] Implement a faster findBitInWord() using the hardware ctz instruction. : [Attachment 399659] proposed patch.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon May 18 11:47:10 PDT 2020
Saam Barati <sbarati at apple.com> has granted Mark Lam <mark.lam at apple.com>'s
request for review:
Bug 212032: Implement a faster findBitInWord() using the hardware ctz
instruction.
https://bugs.webkit.org/show_bug.cgi?id=212032
Attachment 399659: proposed patch.
https://bugs.webkit.org/attachment.cgi?id=399659&action=review
--- Comment #3 from Saam Barati <sbarati at apple.com> ---
Comment on attachment 399659
--> https://bugs.webkit.org/attachment.cgi?id=399659
proposed patch.
View in context: https://bugs.webkit.org/attachment.cgi?id=399659&action=review
r=me
> Source/bmalloc/bmalloc/Algorithm.h:239
> + if ((index < endIndex) && word) {
I don't think we need the first (index < endIndex) check.
Also, I'd expect this algorithm below of ctz to just work on zero too, since
that'd put us past the endIndex.
however, as you said, maybe ctz doesn't do good things for zero? I just find
that very surprising
Ditto about WTF code.
More information about the webkit-reviews
mailing list