Open Bug 1491204 Opened 6 years ago Updated 2 years ago

Coalleace nursery tests per basic block

Categories

(Core :: JavaScript Engine: JIT, enhancement, P2)

enhancement

Tracking

()

Tracking Status
firefox64 --- fix-optional

People

(Reporter: pbone, Unassigned)

Details

Each nursery allocation must test if there is room in the nursery for the allocation, this is done by calcuating the address of the next object to be allocated and comparing that to the end of the nursery.  We do this for each allocation.

Since we use bump-pointer allocation for nursery allocations we could calculate the total size of all objects along an execution path (in a basic block but delimited by jumps) and test this against the end of the nursery once, avoiding multiple branches.  Although the extra branches will usually be predicted well, they will consume instruction bandwidth/space and take up space in the branch predictor.

This mightn't give a huge boost but could help.  It probably shouldn't be done when a large object (like an array) or an object whose size isn't known at JIT-time.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.