Tidy up some FastDivisor things
Categories
(Core :: Memory Allocator, task, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox110 | --- | fixed |
People
(Reporter: pbone, Assigned: pbone)
References
Details
Attachments
(4 files)
This is a follow-up for Bug 1743322 that tidies up a few things that could be improved.
| Assignee | ||
Comment 1•3 years ago
|
||
| Assignee | ||
Comment 2•3 years ago
|
||
Rename the m and p variables to match those used in the Hacker's Delight
book where the algorithm is presented. There were also some inconsistent
names in comments that this fixes.
Depends on D164886
| Assignee | ||
Comment 3•3 years ago
|
||
Don't wait until runtime to test that all valid divisions work. Test them
during initialisation in debug builds.
Depends on D164887
| Assignee | ||
Comment 4•3 years ago
|
||
We want to be precise about types used here. Although in practice unsigned
is the same as uint32_t, it's not guaranteed. We want to definitely use
32-bit multiplication as it can be faster than 64-bit.
Depends on D164888
Comment 6•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/18d20db4c000
https://hg.mozilla.org/mozilla-central/rev/f969998c988e
https://hg.mozilla.org/mozilla-central/rev/3b565e52fea8
https://hg.mozilla.org/mozilla-central/rev/16b643d610fc
Description
•