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:
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
Post a Comment