*****SPAM***** Re: Smalltalk: Requiem or Resurgence? {Dr. Dobb's Journal (05/06/06) Chan, Jeremy}

tim Rowledge tim at rowledge.org
Fri May 12 17:24:58 UTC 2006

On 12-May-06, at 9:15 AM, Charles D Hixson wrote:

> (Well,
> compilation to C would be better, but I'm presuming that this is
> impossible.)

Why would compilation to C be better? You wouldn't gain any  
performance in any serious application. Consider a moment; to send  
messages you have to do certain work. If you compiled
'foo doThis: 4'
into C it would have to be something like
messageSend(foo, 'doThis', 4);
and the messageSend function would be pretty much exactly what we  
already have in the VM.
"Ah, but arithmetic would be faster!", cries the C programmer. Well,  
just possibly, if you know you have value restrictions that would  
work in C. Any time there is a chance of overflowing int values, or  
heterogeneous content in an array you're royally screwed.

And so on. IF you have very repetitive work to do on a statically  
limited dataset then C can do better. Sometimes. And in that case we  
write a plugin and get the best of both worlds.

tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Oxymorons: Soft rock

More information about the Squeak-dev mailing list