Closed Bug 1087232 Opened 5 years ago Closed 5 years ago

Stop atomizing eval strings for the eval cache

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
CompileScript atomizes the source string and stores it in the script's atom map, so that, if the script is stored in the eval cache, we can use this string to compare against new eval strings.

Atomizing large strings can be pretty expensive, and most of those scripts probably can't even be stored in the eval cache so in a lot of cases we're doing unnecessary work.

This patch adds a JSLinearString* to EvalCacheEntry and uses that instead. This makes some JSBench tests faster and wins a few hundred points on Octane-CodeLoad.
Attachment #8509346 - Flags: review?(luke)
Comment on attachment 8509346 [details] [diff] [review]
Patch

Review of attachment 8509346 [details] [diff] [review]:
-----------------------------------------------------------------

That's a pretty nice win for a pure code-removal patch.
Attachment #8509346 - Flags: review?(luke) → review+
https://hg.mozilla.org/mozilla-central/rev/8290a228d038
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.