Re: Troll-o-Matic



funkyj wrote:
<snip>
====

Going a little off topic (or perhaps going more on topic) ...

http://www.ffconsultancy.com/free/ray_tracer/languages.html

I recently read about the benchmark above and boy did ocaml (and
stalin) kick Lisp's ass 3 ways to sunday.

You'd think Lisp could at least be competitive with Java on the
verbosity front if not beat it on performance. Is ocaml really that
much better than lisp? What major language features, if any are
present in CL and ocaml and not in the other (e.g. macros)?

Also, what is the secret of Stalin's success? Perhaps SBCL can be
converted to despotism and reap similar rewards.

I suspect that Lisp's runtime type system is the problem here. ocaml,
Java and C++ are (as far as I am aware) largely statically typed
systems. ocaml doesn't often require type declarations as it infers
them where possible. In this extremely math heavy example, static
typing is a big win. Stalin is an agressive Scheme compiler that does
whole program analysis (that is presumably why it takes so long for
even a trivial example), so I suspect that Stalin is removing all
runtime type checking because that is possible in this example.

I suspect the Lisp speed could be further increased at the cost of
verbosity.
Also, you should be aware that the author of the study shows a bias
toward statically typed languages - I don't know if that will skew
results.

But yes, in this floating point intensive example, Lisp (at least SBCL)
gets beaten like a red-headed stepchild.

Cheers
Brad

.



Relevant Pages

  • Re: Program compression
    ... In Common Lisp it's just one line of code: ... In OCaml with OCaml's notation: ... In Common Lisp, it's another one line of code: ... Consider parsing Mathematica expressions including lists, rules, sums, ...
    (comp.programming)
  • Re: Alternatives 4
    ... This does show something interesting about lisp, ... And the OCaml code demonstrates how other languages can provide both ... performance and brevity at the same time, which is the power of OCaml. ... Emacs is the best there is as far as an IDE for OCaml goes ...
    (comp.lang.lisp)
  • Re: Alternatives 4
    ... performance and brevity at the same time, which is the power of OCaml. ... And the optimized lisp benchmarks twice as fast... ... I do not believe longer identifiers improve clarity at all in such ...
    (comp.lang.lisp)
  • Re: Program compression
    ... Haskell, SML, OCaml, Mathematica, F# and Scala all allow real ... problems to be solved much more concisely than with Lisp. ... for simple lists those three languages equal Lisp in conciseness. ... and thus there's no need for concurrent GC. ...
    (comp.programming)
  • Jon Harrop rewrite benchmark; Qi, Lisp and OCaml
    ... Lisp source written by Andre Thieme, ... The problem is to simplify symbolic expressions by applying the ... Language: OCaml ... (TAGBODY ...
    (comp.lang.lisp)