diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-05 23:58:47 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-06 00:29:15 +0200 |
commit | 64b29eb4596976138b2e4f67f8502419e584f1e4 (patch) | |
tree | e16a0965e0613b3247e64cb363e654847ef6a20e /Userland/Libraries/LibWeb/Bindings/CSSRuleWrapperFactory.cpp | |
parent | cf62d08b2ad8180249f68cd71a16c437706d000c (diff) | |
download | serenity-64b29eb4596976138b2e4f67f8502419e584f1e4.zip |
LibJS: Implement string concatenation using ropes
Instead of concatenating string data every time you add two strings
together in JavaScript, we now create a new PrimitiveString that points
to the two concatenated strings instead.
This turns concatenated strings into a tree structure that doesn't have
to be serialized until someone wants the characters in the string.
This *dramatically* reduces the peak memory footprint when running
the SunSpider benchmark (from ~6G to ~1G on my machine). It's also
significantly faster (1.39x) :^)
Diffstat (limited to 'Userland/Libraries/LibWeb/Bindings/CSSRuleWrapperFactory.cpp')
0 files changed, 0 insertions, 0 deletions