Aaron W. Hsu
6/15/2010 12:12:00 AM
fortunatus wrote:
> The only point to discuss would be that Scheme - in the R5 version of
> the spec at least - doesn't have standard way to specify type data
> unless I am mistaken. Therefore you will find that Scheme compilers
> add their own syntax for it. Again we are led to a moot point.
One of the points of something like Chez Scheme is that it compiles
standard Scheme, without additional static typing -- which, personally,
I find rather annoying -- into code that is often quite competitive with
C code if not faster.
More specifically, there is nothing inherently slow about the Scheme
language. While there are some things that are inherently expensive,
they are not more expensive than the equivalent constructs in C by
nature. Scheme can be compiled into very fast code, without resorting to
tricks like type declarations, and there are real life compilers out
there which do this.
I've heard it said, it is easy to beat C compilers for fast code, it's
just hard to beat them at benchmarks written for C. That is, do the same
type of things as what Scheme gives you, such as lots of dynamic
allocation and resizing, higher order functions, and closures, and you
won't find C faster. Benchmarks to compare C with Scheme often don't
compare the things Scheme is good at, but focus only on the static
things that C was designed for.
Aaron W. Hsu