JavaScript optimizations (Re: welcome)
Maciej Stachowiak
mjs@apple.com
Thu, 9 Jan 2003 00:26:39 -0800
On Wednesday, January 8, 2003, at 11:27 PM, Dirk Mueller wrote:
> On Mit, 08 Jan 2003, Don Melton wrote:
>
>> Yeah, that's what we figured might happen. We realized that we were
>> breaking binary compatibility but for a significant performance gain
>> on
>> i-Bench, it seemed worth it.
>
> True. But I doubt that this is the case for the ~DOMString() fix. I
> believe
> i-Bench is mainly JS dependend and as kjs was slow because of the
> heaps of
> string comparisons (something like >95% in many cases), your Identifier
> change combined with the clever garbage collector improvements must
> have
> given a tremendous speedup.
>
> Did you do some numbers on how much each particular optimisation had as
> effect?
We do have numbers, but sometimes the % improvement is for a group of
optimization, and sometimes a single optimization is broken into
multiple steps, so it's hard to tell. I can tell you right now that
some of the best optimizations were the very ones that broke
compatibility (like various inlines, the SimpleNumber change, and the
Identifier change). The single biggest improvement on i-bench was the
array sorting change, but I believe that requires the change to keep
array elements in an array instead of as general properties and I don't
think that one is 100% compatible.
Regards,
Maciej