зеркало из https://github.com/mozilla/pjs.git
edb1708628
Currently in the interpreter mode all number literals are stored in InterpreterData.itsICode as an index to InterpreterData.itsNumberTable which holds the actual value. For integers that fit 2 or 4 bytes this is an overkill and the attached patch stores integers in InterpreterData.itsICode inline after special TokenStream.INTNUMBER or TokenStream.SHORTNUMBERS tokens. The changes made benchmarks to run 1.5% faster. It also saves memory because InterpreterData.itsNumberTable is allocated only for non-integers that present only in a small number of scripts. In principle, it may be possible to store all numbers inline as well, but unfortunately re-assembling of 8 bytes from InterpreterData.itsICode array into double is rather slow operation and is not worth the hassles. Regards, Igor |
||
---|---|---|
.. | ||
benchmarks | ||
js2 | ||
jsd | ||
jsdj | ||
jsj | ||
macbuild | ||
ref | ||
rhino | ||
src | ||
tests | ||
.cvsignore | ||
Makefile.in | ||
landbranch.pl | ||
makefile.win |