Closed Bug 1743322 Opened 2 years ago Closed 1 year ago

Speed up arena_run_reg_dalloc

Categories

(Core :: Memory Allocator, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: pbone, Assigned: pbone)

References

Details

Attachments

(2 files, 1 obsolete file)

The FastDivide code here isn't actually faster than just doing a division. At least on my Skylake system. It's probably still better in some systems.

I've found that I can speed this code up further by eluding the branches we use to decide how to divide.

Attachment #9252788 - Attachment description: Bug 1743322 - Elude the branches deciding how to divide r=glandium → Bug 1743322 - Remove branches that decide how to divide r=glandium

Make mRunSize the number of pages in a run rather than bytes, so that it can
be stored in a single byte and save some space in bin headers.

Depends on D132322

Depends on D140036

Attachment #9305237 - Attachment is obsolete: true
Attachment #9266023 - Attachment description: Bug 1743322 - Make mRunSize the number of pages in a run r=glandium → Bug 1743322 - Make arena_bin_t 32 or 48 bytes long r=glandium
Pushed by pbone@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/25647d613534
Remove branches that decide how to divide r=glandium
https://hg.mozilla.org/integration/autoland/rev/d299fa6358f7
Make arena_bin_t 32 or 48 bytes long r=glandium

Backed out for causing multiple failures

Backout link

Push with failures

Failure log 1
Failure log 2

Seems that it only happened on OS X 11 WebRender Shippable.

Flags: needinfo?(pbone)

I forgot to test on ARM64, especially M1 whose pagesize is larger and therefore the division constants I chose don't work

Flags: needinfo?(pbone)
Pushed by pbone@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3a6e4adf6853
Remove branches that decide how to divide r=glandium
https://hg.mozilla.org/integration/autoland/rev/72ad95ef4cde
Make arena_bin_t 32 or 48 bytes long r=glandium
https://hg.mozilla.org/integration/autoland/rev/febef97c7fbe
1743322: apply code formatting via Lando
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
Blocks: 1806049
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: