There are many IO operations(database) in mingle test, so the
proportion of improvement is decreased.
From bench_method_dispatch.rb, the improvement is 5-10%. Of course,
it's also a special case.

On the other hand, JRuby use intern to compare to String with "==" in
many places, so the improvement is not so much like XRuby. But it's
impossible to replace all equals with "==", because equals is called
to compare in hashmap.

Ye Zheng


2007/6/29, Charles Oliver Nutter <[EMAIL PROTECTED]>:
Ola Bini wrote:
> Thomas E Enebo wrote:
>> I wonder if we cannot do more to try and intern all methods names?  If
>> so then we could do direct == comparison.  All method names coming
>> from parser are intern'd.  Also all literal Java strings:
>>
>> callMethod("foo")
>>
>> are also intern'd.  So the 10,000$ question is where aren't we
>> interning?  Could intern'ing (which is likely to be more brittle) be
>> an approach to take?
>>
>> -Tom
>>
>> PS - I apologize in advance since I think I have had this conversation
>> before...I cannot remember the answer from last time we talked about
>> it.
>
> We have had this discussion before, a while back; Charles did a spike
> and found that interning everything was actually quite a bit slower than
> the current approach (if I remember correctly).

Actually, if I remember right it was ID hashmaps that were way slower;
interning works pretty well to speed up hashmaps, and we generally just
need to make a best attempt to intern strings where possible. So we do
that throughout the AST, and we use literal strings in many places.
There's probably not much more interning that could be done to speed
those things up.

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email




--
Everything is simple!

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to