It's most likely the Memory parse cost.  The first time you access memory, you incur the cost of unpacking the whole thing. Try adding another 2 lines at the top:   console.log('before memory', Game.cpu.getUsed()); Memory; // This will force the Memory to de-serialize and be read into the cache for use during the tick <rest of your code here>