[ENH] Faster Sorted Collections

Andrew C. Greenberg werdna at gate.net
Mon Dec 6 04:01:50 UTC 1999


>Thanks Stephen -- this is very useful! I wasn't aware that 
>activating a block is that much more expensive than the same code in 
>a method. I'm curious -- can block access be optimized? In Visual 
>Works, for example, would your equivalent fix produce roughly the 
>same improvement?

Many block references are already optimized in Squeak.  Many "control 
structures" are directly compiled to bytecodes.  Its only when stored 
in a BlockContext or passed to a message that is not hard-coded that 
things get messy.

Pluggability has its costs and its benefits.  Yes, there is an 
overhead.  On the other hand, there is a substantial reuse benefit as 
well.  The question is whether the overhead is, at the end of the day 
"worth it."  Where it is not, simply use a hard-coded work-around.





More information about the Squeak-dev mailing list