Electron build decreases performance

39 Views Asked by At

In my current side project my code is performing a large amount of very simple computation on large numbers.

To simplify my loop is:

let t = // big number
let b = a // big number
while(t > 0) {
     b = b ^ (2^1024) MOD N
     t -= 1024
}

To monitor the performance, I've implemented a benchmark function that permits to get the velocity of this loop on my hardware (number of exponentiation per second)

  • If I'm running the benchmark on nodeJS I got something around 400 kExp/s
  • If I'm running the benchmark in dev with Electron (started with "electron .") I got something around 800 kExp/s
  • If I'm running the benchmark in prod with Electron (bundled with electron-builder) I got something around 400 kExp/s

Do you have an idea to explain why Electron is so fast in development mode ? I'm very curious about the reason which can explains such differences.

0

There are 0 best solutions below