jastrachan | 10 May 08:17 2004
Picon

Re: [groovy-dev] Don't run benchmarks as scripts

BTW I remember Sam enabling reflection (rather than using our own 
bytecode generated reflectors) for scripts to improve startup times. I 
wonder if that has an effect?

On 10 May 2004, at 03:34, LARSON, BRIAN (SBCSI) wrote:

> You beat me to it.  Properties seem to be main culprit.
> Optimizations probably should wait until the JSR process
> makes some decisions about the language in this area.
>
> Thanks,
> Brian Larson
> SBC
>
> Thomas Heller said:
>> John Wilson wrote:
>>> I have found that scripts run about twice as slowly as programs.
>>>
>>
>> Hey John,
>>
>> Brian Larson did some research on this in January I think.
>> Scripts are
>> much slower than compiled classes due to their dynamic nature
>> and having
>> a Map backing up the properties instead of just fields on a class.
>>
>> So:
>>
>> x = 3;
>>
>> println(x);
>>
>> in a Script means
>>
>> binding.setProperty("x", 3);
>> println(binding.getProperty("x"));
>>
>>
>> See the discussion here:
>>
> http://lists.codehaus.org/pipermail/groovy-dev/2004q1/001472.html
>
> I guess the behaviour won't change for scripts, but you are right. 
> Don't
>
> do benchmarks as scripts. Probably there is some room for optimizations
> but we shouldn't go there yet. ;)
>
> And I need to get James to rework the Script issue I have discussed 
> with
>
> him some time ago. I'll hope I find some time to talk about it again
> soon. :)
>
> /thomas
> _______________________________________________
> groovy-dev mailing list
> groovy-dev@...
> http://lists.codehaus.org/mailman/listinfo/groovy-dev
>
>

James
-------
http://radio.weblogs.com/0112098/

Gmane