Tuesday 3 May 2016

Is it true that by re-compiling nodejs with different options will obtain better performances? [CPU/Cores]

Recently, I was running two similar piece of code, to obtain the same result: One was more complex (sorting an array, extracting first and last element), the other one less complex (using Math.max and Math.min to extract the values). I have noticed that on my Mac, the "complex" solutions runs faster than the simple solution. Instead the version for my RaspberryPi, was taking less time to run the less complex solution and more time for the other one.I am guessing that the numbers of cores affecting some callbacks or methods like Array.map or Array.forEach... Is it true then, that by re-compiling nodes from the sources, but with different options, I may obtain similar performances? Would that be possible?

Submitted May 03, 2016 at 09:30PM by koalalorenzo

No comments:

Post a Comment