Closed Bug 639729 Opened 14 years ago Closed 14 years ago

inline GC mark path

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: gal, Assigned: gal)

References

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

No description provided.
Attached patch patchSplinter Review
Assignee: general → gal
This inlines the GC mark path. A single call out is made if the slots are > 0 and we have to mark them. Many objects have no own slots, so we win a bit.
Attachment #517635 - Flags: review?(wmccloskey)
A couple of the dependencies aren't landed yet, so this probably has to wait a day or two.
The assert meant to be span <= slots of course. Sorry for that.
Test case: var prev = null; for (var i = 0; i < 1000000; ++i) { var next = ({}); next.prev = prev; prev = next; } var t = Date.now(); for (var i = 0; i < 100; ++i) gc(); print(Date.now() - t); Without any of the dependencies above and this patch applied: kahoolawe:src gal$ ./Darwin_OPT.OBJ/js x.js 5719 kahoolawe:src gal$ ./Darwin_OPT.OBJ/js x.js 5751 With all of the dependencies and this patch applied: kahoolawe:src gal$ ./Darwin_OPT.OBJ/js x.js 4690 kahoolawe:src gal$ ./Darwin_OPT.OBJ/js x.js 4735 The speedup is around 22%. To quote Hannibal, I love it when a plan comes together.
Does this get a speedup on Windows, too? I would think PGO would totally do this.
Comment on attachment 517635 [details] [diff] [review] patch Great!
Attachment #517635 - Flags: review?(wmccloskey) → review+
Whiteboard: fixed-in-tracemonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: