Setting break points

Avi Bryant avi at beta4.com
Mon Nov 17 21:50:41 UTC 2003


On Nov 17, 2003, at 1:34 PM, ducasse wrote:

>>>
>>
>> Not entirely - MethodWrappers is an extra package with some pretty 
>> ugly code, ObjectsAsMethods seems to Just Work now that VM support is 
>> there.  Also, ObjectsAsMethods has surprisingly little overhead - I 
>> measure about 30-40% slower than a normal CompiledMethod, whereas I 
>> remember MethodWrappers having much more than that.
>
> This is strange because when I benchmarckd in 99 MethodWrappers they 
> were the best in term of speed compared to all kinds of other tricks
> I used (anonymous behavior)...in VW.

Presumably modifying the VM, as Andreas did, wasn't one of the options 
you benchmarked.
Anyway, running a very simple method 100k times, I see:

Plain method: 61ms
Object as method: 110ms
Wrapped method: 1077ms

> I never noticed that the code was that bad. Normally john writes quite 
> good code.

I didn't say "bad", I said ugly - mostly what I'm thinking of is the 
need to generate and compile strings of code (look at MwMethodWrapper 
class>>codeStringFor:).  Given the constraints (not hacking the VM), 
I'm sure John made the best choices.

Avi




More information about the Squeak-dev mailing list