| Benedikt Rosenau 2006-01-21, 6:59 pm |
|
The piece of code following is a well known endless loop:
((call-with-current-continuation call-with-current-continuation)
(call-with-current-continuation call-with-current-continuation))
For some implementations, the memory used stays constant, whereas it
grows apparently indefinitely for the others.
Constant memory usage was shown by:
Chicken 2.216
Gauche 0.8.6
Scheme48 1.3
Scsh 0.6.6
STKlos 0.71
These implementations needed more and more memory:
Bigloo 2.7a
Elk 3.0
Gambit 4.0 beta 15
Guile 1.6.4
Ksi 3.4.2
KoScheme 0.6.0
Mzscheme(3m) 300
Petite Chez 7.0a
Petit Larceny 0.90 nasm linux
Rhizome/pi 0.57
SCM 5e1
If an implementation provides both interpreter and compiler, then the
same behavior is shown by interpreter and compiler.
With the exception of Petit Larceny, the implementations with constant
memory use evaluate operands before the operator.
Is that a known effect? And if so, why is Petit Larceny different?
Benedikt
|