From 3f2f887666b49b81f9e9b5dbebaeca0fc3543a3c Mon Sep 17 00:00:00 2001 From: daurnimator Date: Tue, 9 May 2017 16:02:06 +1000 Subject: Revert "src/lstring.js: Freeze strings to catch accidental modification" This reverts commit 5cb00bbae4f1afb5cd476a637975dd9220898e15. It turns out that frozen objects are slower, see https://jsperf.com/object-freeze-performance --- src/lstring.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lstring.js b/src/lstring.js index cc399b8..1887e85 100644 --- a/src/lstring.js +++ b/src/lstring.js @@ -43,7 +43,6 @@ const luaS_hashlongstr = function(ts) { /* variant that takes ownership of array */ const luaS_bless = function(L, str) { - Object.freeze(str); return new TString(L, str); }; -- cgit v1.2.3-70-g09d2