Bug 1721413 Comment 4 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Tooru Fujisawa [:arai] from comment #3)
> in ScriptPreloader usage:
>   * 532 calls for InstantiateAtoms during startup
>   * 106149 calls for AtomizeChars

during Firefox startup, with profiler, ~30ms is taken inside `AtomizeChars` for them.

in JS shell, in single realm.
calling `AtomizeChars` for all of them takes 16 ms,
and calling `JS_NewStringCopyN`/`JS_NewUCStringCopyN` for all of them takes 6ms.

applying this for string literals there could reduce the startup time by up to 5ms.
(In reply to Tooru Fujisawa [:arai] from comment #3)
> in ScriptPreloader usage:
>   * 532 calls for InstantiateAtoms during startup
>   * 106149 calls for AtomizeChars

during Firefox startup, with profiler, ~30ms is taken inside `AtomizeChars` for them.

in JS shell, in single realm.
calling `AtomizeChars` for all of them takes 16 ms,
and calling `JS_NewStringCopyN`/`JS_NewUCStringCopyN` for all of them takes 6ms.

~~applying this for string literals there could reduce the startup time by up to 5ms.~~

Back to Bug 1721413 Comment 4