mozilla / pluotsorbet

[ARCHIVED] PluotSorbet is a J2ME-compatible virtual machine written in JavaScript.
GNU General Public License v2.0
237 stars 46 forks source link

Optimize inflate() function. #1846

Open mbebenita opened 9 years ago

mbebenita commented 9 years ago

A hand tuned version of inflate (https://gist.github.com/mbebenita/be701a32a07afad4ff93) yields nearly a 2X perf improvement, from 1.2s to 0.6s when decompressing all classes in a large jar file. Zlib via emscripten is about 1.4s.

The referenced gist is a very hacky / quick dirty experiment to find out if there is room for improvement, and it looks like there is.