Closed Bug 957570 Opened 11 years ago Closed 2 years ago

IonMonkey: inline allocation of the result of re.exec()

Categories

(Core :: JavaScript Engine: JIT, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1066828

People

(Reporter: h4writer, Unassigned)

References

(Blocks 1 open bug)

Details

Using MNewArray and MNewSlots we can inline the allocation of re.exec(). This is faster than doing this in c++. One issue is that re.exec returns null when there is no match. So we can't predict we need to allocate.

The idea is to have a place to store a "result array" ready for use. Everytime we do an exec() we will create a new "result array" when it is empty. Else we use that "result array". exec() will use that array and if not needed it can get used for the next exec().

Inlining the allocation was an improvement from 170ms -> 140ms on microbenchmark of /ra/.exec("fdsraqfqrafsqffsqsqf");
Blocks: 806646
Depends on: 957542
Tried this again and this doesn't improve performance anymore :(
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.