Open Bug 957570 Opened 7 years ago Updated 7 years ago
Monkey: inline allocation of the result of re .exec()
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");
Tried this again and this doesn't improve performance anymore :(
You need to log in before you can comment on or make changes to this bug.