Skip to content

Commit e2f01aa

Browse files
committed
feat(vm): prealloc 128 scope views for better perfs
1 parent 7c425d3 commit e2f01aa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/arkreactor/VM/VM.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ namespace Ark
142142
m_exit_code = 0;
143143

144144
context.locals.clear();
145+
context.locals.reserve(128);
145146
context.locals.emplace_back(context.scopes_storage.data(), 0);
146147

147148
// loading bound stuff

0 commit comments

Comments
 (0)