mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:37:43 +00:00
AK+LibRegex+LibWasm: Remove the non-const COWVector::operator[]
This was copying the vector behind our backs, let's remove it and make the copying explicit by putting it behind COWVector::mutable_at(). This is a further 64% performance improvement on Wasm validation.
This commit is contained in:
parent
cced555879
commit
8003bde03d
4 changed files with 14 additions and 22 deletions
|
@ -38,8 +38,7 @@ ErrorOr<void, ValidationError> Validator::validate(Module& module)
|
|||
m_context = {};
|
||||
|
||||
module.for_each_section_of_type<TypeSection>([this](TypeSection const& section) {
|
||||
for (auto& type : section.types())
|
||||
m_context.types.append(type);
|
||||
m_context.types.extend(section.types());
|
||||
});
|
||||
|
||||
module.for_each_section_of_type<ImportSection>([&](ImportSection const& section) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue