mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user