[UI] Compiler messages

tim Rowledge tim at rowledge.org
Tue Nov 13 23:03:08 UTC 2007


On 13-Nov-07, at 2:47 PM, Bill Schwab wrote:

> Gary,
>
> Agreed, with the caveat that I am currently thinking contexts are
> preferred to exceptions in this case (for speed).

> [snip]
>
> This reminds me of EndOfStream.
Whoah, neddy!

This really isn't much like that at all. An EndOfStream exception  
might possibly cause a noticeable slowdown in a tight stream based  
loop, assuming that the rest of the work being done in said loop is  
trivial. Having exceptions involved in compiling is hardly the same;  
compiling is a pretty big job!

Having a 'signal exception' in your code costs nothing much,  
especially of course if it is not actually executed - the normal case.  
Actually raising the exception costs a scan of the execution stack -  
done in primitive code that is rather well written - with a check in  
Squeak code at each place where an exception handler context is found.  
If you had a really deep stack with an exception handler not relevant  
to your code at every other level (why it can't be at every level is  
left as an exercise for the student) then raising an exception would  
of course take some time.

Compile speed is rarely much of an issue and hasn't been for decades  
in ST code. Unless of course you're loading megabytes of the stuff at  
a gulp, in which case I'd politely suggest your overall process sucks.


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Useful random insult:- A room temperature IQ.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/ui/attachments/20071113/247d3b90/attachment.htm


More information about the UI mailing list