summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Runtime
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-06 19:22:12 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-06 19:22:12 +0200
commit5495f06af55bc371b3f4b3e09960ce0fbbe49590 (patch)
tree94c6fa38dd0e9b4b81f011cbdd6d05cd51e3c453 /Libraries/LibJS/Runtime
parentbe019f28caa5400db817ef00ac6bd727c7252d0f (diff)
downloadserenity-5495f06af55bc371b3f4b3e09960ce0fbbe49590.zip
LibJS: Give argument vectors an inline capacity of 8
This avoids one malloc/free pair for every function call if there are 8 arguments or fewer.
Diffstat (limited to 'Libraries/LibJS/Runtime')
-rw-r--r--Libraries/LibJS/Runtime/ScriptFunction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibJS/Runtime/ScriptFunction.cpp b/Libraries/LibJS/Runtime/ScriptFunction.cpp
index 524358ca33..8a30d7898b 100644
--- a/Libraries/LibJS/Runtime/ScriptFunction.cpp
+++ b/Libraries/LibJS/Runtime/ScriptFunction.cpp
@@ -48,7 +48,7 @@ ScriptFunction::~ScriptFunction()
Value ScriptFunction::call(Interpreter& interpreter)
{
auto& argument_values = interpreter.call_frame().arguments;
- Vector<Argument> arguments;
+ ArgumentVector arguments;
for (size_t i = 0; i < m_parameters.size(); ++i) {
auto name = parameters()[i];
auto value = js_undefined();