summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Bindings/CSSRuleWrapperFactory.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-08-05 23:58:47 +0200
committerAndreas Kling <kling@serenityos.org>2022-08-06 00:29:15 +0200
commit64b29eb4596976138b2e4f67f8502419e584f1e4 (patch)
treee16a0965e0613b3247e64cb363e654847ef6a20e /Userland/Libraries/LibWeb/Bindings/CSSRuleWrapperFactory.cpp
parentcf62d08b2ad8180249f68cd71a16c437706d000c (diff)
downloadserenity-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