JS demo (https://www.fxhash.xyz/generative/19851 ) is 50% slower in Nightly
Categories
(Core :: JavaScript Engine, task, P5)
Tracking
()
People
(Reporter: mayankleoboy1, Unassigned)
References
(Blocks 1 open bug, )
Details
Go to https://www.fxhash.xyz/generative/19851
Click on run
Nightly: https://share.firefox.dev/49egQTc (24s)
Chrome: https://share.firefox.dev/49vQ34M (16s)
Reporter | ||
Comment 1•11 months ago
|
||
Some other demos by the same author are also worse in Nightly
https://www.fxhash.xyz/generative/20874 : https://share.firefox.dev/3SH6pAB
Comment 2•11 months ago
|
||
The demo uses p5.js, which includes a so-called Friendly Error System. This feature validates each function call parameter by performing object lookups and therefore should only be used during development, because it's known to lead to degraded performance.
In this specific case, the function arguments are fractional numbers, so we end up repeatedly calling js::NumberToAtom
, which in turns calls FracNumberToCString
and js::Atomize
. We have a one-element double-to-string cache, whereas V8's double-to-string cache initially has 256 elements, but can grow up to 16384 elements. So V8 is only faster because they have a larger cache, which means less time is spent for double-to-string conversions.
Updated•11 months ago
|
Updated•11 months ago
|
Description
•