From 78768e00d4e966c6211bd88ec046f3bb369aa68b Mon Sep 17 00:00:00 2001 From: s2224834 <46319860+s2224834@users.noreply.github.com> Date: Thu, 10 Jan 2019 18:44:50 +0000 Subject: [PATCH] Bombe: Firefox optimisation Switch a couple of for of loops in the critical path for classic fors. This loses about 10% performance in Chrome, but it brings Firefox performance in line with Chrome's, rather than 2.5 times slower. --- src/core/lib/Bombe.mjs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/lib/Bombe.mjs b/src/core/lib/Bombe.mjs index 8b781b68..7400c98a 100644 --- a/src/core/lib/Bombe.mjs +++ b/src/core/lib/Bombe.mjs @@ -514,7 +514,8 @@ export class BombeMachine { const idxPair = 26*j + i; this.wires[idxPair] = true; - for (const scrambler of this.scramblers[i]) { + for (let k=0; k