optimization - Does minifying JavaScript have a slower execution time? -


i testing whether minified javascript performs better on mobile devices. while researching topic came across jsperf test:

http://jsperf.com/minified-vs-crushed/2

according test removing whitespace speeds execution minifying code makes run slower. know minified should speed loading times make execution times slower? there not understanding here?

further reading:

does minified javascript improve performance?

that bad jsperf - whichever test put first run fastest. switched order here: http://jsperf.com/minified-vs-crushed/5

when creating jsperf, need careful not modify context in way might throw off later tests. code changing environment (ie. adding event listeners) causing later tests take longer run.

so answer question: no, minifying js not cause slower execution times.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -