mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:04:59 +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
2 changed files with 0 additions and 8 deletions
|
@ -10,10 +10,6 @@ namespace JS::Bytecode {
|
|||
|
||||
IdentifierTableIndex IdentifierTable::insert(DeprecatedFlyString string)
|
||||
{
|
||||
for (size_t i = 0; i < m_identifiers.size(); i++) {
|
||||
if (m_identifiers[i] == string)
|
||||
return i;
|
||||
}
|
||||
m_identifiers.append(move(string));
|
||||
return m_identifiers.size() - 1;
|
||||
}
|
||||
|
|
|
@ -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