зеркало из https://github.com/mozilla/pjs.git
332f58b128
Also, accept patches from Igor: Subject: Rhino: UintMap optimization Date: Fri, 06 Jul 2001 13:14:49 +0200 From: Igor Bukanov <igor@icesoft.no> Organization: Wind River To: Norris Boyd <nboyd@atg.com> Hi, Norris! Currently omj.Node uses Hashtable to map int property types to objects/integer. In my opinion this is very inefficient: to store single int property it creates 5 objects: one for property Hahstable, 2 Integer wrappers for property/value, array to sore Hahstable slots and Hashtable slot itself. To fix this I added omj.UintMap class that can map non-negative integers to objects or integers and modified omj.Node to use it. The class is a hashtable implementation that uses one int[] and one Object[] arrays to store keys/values and Object[] array is not created if the map contains only integers. To take full advantage of omj.UintMap code has to be modified to use Node.getIntProp/Node.putIntProp to store int properties, but even in this form it is a win. I can provide patches to use Node.getIntProp/Node.putIntProp and UintMap for InterpreterData.itsLineNumberTable if this is OK. Regards, Igor |
||
---|---|---|
.. | ||
benchmarks | ||
js2 | ||
jsd | ||
jsdj | ||
jsj | ||
macbuild | ||
ref | ||
rhino | ||
semantics | ||
src | ||
tests | ||
.cvsignore | ||
Makefile.in | ||
landbranch.pl | ||
makefile.win |