Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!think.com!snorkelwacker.mit.edu!ai-lab!zurich.ai.mit.edu!jinx From: jinx@zurich.ai.mit.edu (Guillermo J. Rozas) Newsgroups: comp.lang.scheme Subject: Re: MIT Scheme performance Message-ID: Date: 23 Apr 91 13:46:07 GMT References: Sender: news@ai.mit.edu Reply-To: jinx@zurich.ai.mit.edu Distribution: usa Organization: M.I.T. Artificial Intelligence Lab. Lines: 57 In-reply-to: lth@idiotix.cs.uoregon.edu's message of 23 Apr 91 07:51:09 GMT In article lth@idiotix.cs.uoregon.edu (Lars Thomas Hansen) writes: Path: ai-lab!mintaka!ogicse!cs.uoregon.edu!skinner!lth From: lth@idiotix.cs.uoregon.edu (Lars Thomas Hansen) Newsgroups: comp.lang.scheme Summary: is it really that shitty, or is something weird happening? Date: 23 Apr 91 07:51:09 GMT Sender: usenet@cs.uoregon.edu (Netnews Owner) Distribution: usa Organization: /home/systems/lth/.organization Lines: 21 Recently, I downloaded the Sparc binaries for MIT Scheme 7.1 from altdorf. Upon testing it, I found that performance was downright pitiful: given the usual fib program (define (fib n) (if (<= n 2) 1 (+ (fib (- n 1)) (fib (- n 2))))) and told to compute (fib 20), MIT Scheme would take over 40 seconds! Several other Scheme systems (Chez 3.0, T 3.1, Xscheme 0.16, Scheme48) took from 1 to 4 seconds on same. And no, this wasn't an isolated example of temporarily heavy load; it's repeatable. Is there something (obvious?) that I forgot to do, or simply is MIT Scheme this bad? --lars The short answer is: On a Sparc, or any other machine to which the native-code compiler has NOT been ported, it is that slow, and I would not use it except as a toy. The long answer is: The time is not spent in fib itself, but in generic arithmetic. Generic arithmetic in MIT Scheme is huge (including ratnums, recnums, etc.) and coded in Scheme itself (rather than in C, etc.), thus the lack of a compiler is most noticeable in the time spent inside the system (arithmetic, list utilities, etc.). Generic arithmetic used to be written in C in MIT Scheme, but that was abandoned when ratnum and recnum support was added. In the presence of a native code compiler, that was a reasonable choice. In the absence of it, it isn't. We could provide two different versions of the system, one that assumes there is a compiler, and one that assumes there is not, but it is too much work, and after all, we only make MIT Scheme available because people want to use it, not because we want them to use it.