Open Bug 1822727 Opened 1 year ago Updated 7 months ago

random-hex.js is faster in V8 than SM

Categories

(Core :: JavaScript Engine, defect, P2)

defect

Tracking

()

People

(Reporter: jrmuizel, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sp3])

Attachments

(1 file, 1 obsolete file)

738 bytes, application/x-javascript
Details
Attached file random-hex.js

This is extracted from the polyfill that I'm using to run the todomvc tests in the shell.
It's an example of V8 doing a lot better on code that only runs 100 times but has heavy usage of builtins.

V8 runs it in 0.42ms, SM takes 0.88ms

Here are profiles of SM: https://share.firefox.dev/3mXsdM7 and V8: https://share.firefox.dev/3Th6vPi

The profiles have a lot of overhead, so the sample counts may not be directly comparable. However, they do give insight into what each engine is doing.

Here's a SM profile with some reduced jitdump overhead: https://share.firefox.dev/3lbmW3a

Blocks: 1801194
Severity: -- → S3
Priority: -- → P2
Whiteboard: [sp3]

This is what i get today:
Chrome: https://share.firefox.dev/3PNDY2f (1s)
Nightly: https://share.firefox.dev/3PEezIg (550ms)

Attached file test.html (obsolete) —

almost the same as the original test, just increase the loop count and removed the print.

I think the low iteration count was the point of the testcase; it was made to show what happens at low JIT tiers. For example, it showed the cost of compiling Baseline ICs in the Baseline Interpreter, and especially the cost of mprotect (fixed in bug 1835876). It also showed how V8's builtins let it go fast even in the interpreter.

Right, I missed that even though its mentioned in comment 0.

Attachment #9357248 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: