Closed Bug 1806049 Opened 3 years ago Closed 3 years ago

Tidy up some FastDivisor things

Categories

(Core :: Memory Allocator, task, P2)

task

Tracking

()

RESOLVED FIXED
110 Branch
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.

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

Don't wait until runtime to test that all valid divisions work. Test them
during initialisation in debug builds.

Depends on D164887

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

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: