Using CCodeGenerator for something beyond Plugins
PhiHo Hoang
phiho.hoang at rogers.com
Thu Mar 21 01:28:14 UTC 2002
Anthony Hannan wrote:
> Pre-compiling a whole Squeak image to native code would not be better
than just-in-time
> compiling primarily because native code takes up a lot more space than
bytecodes. It is
> better to only compile bytecodes that are needed.
I also like true JIT. The term 'pre-JIT' is kind of funny too;
but in the lack of a JIT, this may be a second best. In 'Back To The
Future', quote:
'However, useful as it is for debugging, the Squeak virtual
machine running on top of Smalltalk is orders of magnitude too slow for
useful work: running in Squeak itself, the Smalltalk version of the
Squeak virtual machine is roughly 450 times slower than the C version. '
BTW, I recall Ian posted a request for help to crash his J4. Did
anyone participate and know what's the current status of Ian's J4 ?
> Each bytecode requires an average of 3 native instructions,
> yielding about 12 bytes per bytecode [1].
> Compiling all bytecodes would create a huge image
Not if we have an efficient module system ;-)
> that could cause performance problems on machines with limited memory.
> In fact in some cases when the cpu cache is sufficiently small
> it is faster to never compile to native code and always interpret
bytecodes [1].
This study was published in 1997. The hardware scenario in 2002
may be quite different from that at the time the study was carried out.
FWIW, I think .NET Framework is delivered pre-JITted
Cheers,
PhiHo.
More information about the Squeak-dev
mailing list
|