home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mitech!gjc
- From: gjc@mitech.com (George J. Carrette)
- Newsgroups: comp.lang.scheme
- Subject: Re: Are interpreters now as fast as compiled code used to be?
- Message-ID: <4065@mitech.com>
- Date: 15 Dec 92 10:26:28 GMT
- References: <4051@mitech.com> <FEELEY.92Dec14215701@zohar.ai.mit.edu>
- Organization: Mitech Corporation, Concord MA
- Lines: 25
-
- In article <FEELEY.92Dec14215701@zohar.ai.mit.edu>, feeley@zurich.ai.mit.edu (Marc Feeley) writes:
- > By the way, does SIOD implement the whole numeric tower?
-
- No. But if it did it would be even faster(*) All computations in SIOD
- are done using the C double type.
-
- Especially on newer RISC computers you will find that the time taken
- for dispatch (and the non-locality of dispatch) can easily be a lot
- more than the time to compute a 64-bit floating point result.
-
- You really have to be careful about the ordering of the switch statements
- and the placement of the "goto's." Taking into account the predictive
- branching hardware in some processors. Truly ugly stuff.
-
- -gjc
-
- (*) I know this to be true because I have another Scheme interpreter used
- in some commercial products that has generic arithmetic and it runs
- standard-fib faster than SIOD. But unfortunately some of the implementation
- techniques look a bit ugly (funky macro preprocessing of C-like source
- files written in Scheme, just for arithmetic dispatch compilation),
- so it is not as nice to release for public consumption as SIOD.
- If C had a decent built-in macro facility, well. No, I take that back,
- even in LISP this kind of macro compilation of arithmetic dispatch
- looks pretty ugly and special-purpose.
-