aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--src/preamble.js1
2 files changed, 2 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
index 2e0c06e8..d1e929fa 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -49,4 +49,5 @@ a license to everyone to use it as detailed in LICENSE.)
* Manuel Schölling <manuel.schoelling@gmx.de>
* Bruce Mitchener, Jr. <bruce.mitchener@gmail.com>
* Michael Bishop <mbtyke@gmail.com>
+* Lorant Pinter <lorant.pinter@prezi.com>
diff --git a/src/preamble.js b/src/preamble.js
index 98395200..24049283 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -470,6 +470,7 @@ function allocate(slab, types, allocator, ptr) {
setValue(ret+i, curr, type);
+ // no need to look up size unless type changes, so cache it
if (previousType !== type) {
typeSize = Runtime.getNativeTypeSize(type);
previousType = type;