On Thu, Oct 9, 2014 at 9:21 PM, Henri Sivonen <hsivo...@hsivonen.fi> wrote: > On Wed, Oct 8, 2014 at 4:13 PM, Jan de Mooij <jandemo...@gmail.com> wrote: > > Has SpiderMonkey ever been instrumented to find out if most strings > are even just ASCII?
There are some measurements in https://blog.mozilla.org/javascript/2014/07/21/slimmer-and-faster-javascript-strings-in-firefox/. But even better, you can visit about:memory and see for yourself. Look for entries like this: │ ├──26.43 MB (08.36%) -- strings │ │ ├──13.98 MB (04.43%) -- malloc-heap │ │ │ ├──10.84 MB (03.43%) ── latin1 │ │ │ └───3.14 MB (00.99%) ── two-byte │ │ └──12.45 MB (03.94%) -- gc-heap │ │ ├───9.05 MB (02.86%) ── latin1 │ │ └───3.40 MB (01.08%) ── two-byte You can see these stats on a per-zone basis in the "explicit" tree, or for the entire main runtime under the "js-main-runtime" tree. "gc-heap" refers to the JSString objects store on the GC heap, some of which hold the entire string's chars. "malloc-heap" refers to separately-stored chars for longer strings. Nick _______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo