mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-14 14:21:56 +00:00
LibJS: Don't worry about deduplicating bytecode string tables
The strings will get deduplicated when actually turned into PrimitiveString objects at runtime anyway, and keeping the string tables deduplicated was actually wasting a lot of time. 4.4% speed-up on Kraken/stanford-crypto-ccm.js :^)
This commit is contained in:
parent
111622a164
commit
feef542c73
Notes:
sideshowbarker
2024-07-16 21:30:46 +09:00
Author: https://github.com/awesomekling
Commit: feef542c73
Pull-request: https://github.com/SerenityOS/serenity/pull/21330
2 changed files with 0 additions and 8 deletions
|
@ -10,10 +10,6 @@ namespace JS::Bytecode {
|
|||
|
||||
StringTableIndex StringTable::insert(DeprecatedString string)
|
||||
{
|
||||
for (size_t i = 0; i < m_strings.size(); i++) {
|
||||
if (m_strings[i] == string)
|
||||
return i;
|
||||
}
|
||||
m_strings.append(move(string));
|
||||
return m_strings.size() - 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue