Closed Bug 595391 Opened 15 years ago Closed 15 years ago

JM: Fix empty script performance

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 614333

People

(Reporter: dvander, Assigned: dvander)

References

Details

Per bug 594972 comment #2 through 4, we should figure out how deal with the empty script. Right now we can't JIT it easily because it sits in read-only memory and is shared across all threads.
Potential options: 1) Special case it in ICs. 2) Remove it. 3) Pre-assemble something and attach it, make the empty script readable. 4) Put an emptyScript bit in JSScript and move the empty script per-compartment.
(In reply to comment #1) > Potential options: > 1) Special case it in ICs. This is the most appealing option to me. It seems that the call IC is the natural place for any kind of special-case action when calling. > 3) Pre-assemble something and attach it, make the empty script readable. This seems to be the easiest dumb solution, so I would go for that if #1 is no-go. But I don't understand #4 and its advantages too clearly, so maybe that one is better.
Dumb background question: when do we actually see the empty script in performant code?
Nevermind, reading through bugmail and I saw bug 594972 comment 4.
Blocks: 594972
No longer depends on: 602747
Assignee: general → dvander
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: x86_64 → All
I can't reproduce this anymore (likely bug 614333). Calling an empty function many times is now as fast as calling a function with "var x" in it.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.