| Summary: | Implement a faster findBitInWord() using the hardware ctz instruction. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Mark Lam <mark.lam> | ||||
| Component: | Web Template Framework | Assignee: | Mark Lam <mark.lam> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | annulen, benjamin, cdumez, cmarcelo, ews-watchlist, gyuyoung.kim, ryuan.choi, saam, sergio, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Mark Lam
2020-05-18 10:32:31 PDT
Created attachment 399659 [details]
proposed patch.
Comment on attachment 399659 [details] 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. Thanks for the review. I've removed the extra check. Landed in r261827: <http://trac.webkit.org/r261827>. |