From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] More Caml
Date: Mon, 22 Dec 2008 17:00:08 +0000 [thread overview]
Message-ID: <200812221700.09010.jon@ffconsultancy.com> (raw)
In-Reply-To: <200812192253.15207.jon@ffconsultancy.com>
On Friday 19 December 2008 22:53:15 Jon Harrop wrote:
> On Friday 19 December 2008 22:36:40 Erik de Castro Lopo wrote:
> > Jon Harrop wrote:
> > > I have actually already started this using the excellent LLVM project
> > > and I just obtained the first promising results yesterday: a simple
> > > benchmark where my compiler runs OCaml code 3x faster than ocamlopt
> > > does.
> >
> > Is this going to be an open source project?
>
> Yes.
Just to update: I've spent a couple more days playing with this. I now have
unit, bools, ints, floats, arrays, fast internal calling convention with tail
calls, C-compatible external calling convention, arbitrary extern functions,
C printf, multiple function arguments and multiple function return values
(passed on the stack!). I have written a few tiny benchmarks and the results
compared to OCaml on x86 are promising:
Float Fibonacci: 2.9x faster than OCaml.
Sieve of Eratosthenes: 1.8x faster than OCaml.
Mandelbrot: 2.9x faster than OCaml.
The compiler is only ~500LOC. The language still lacks closures, a garbage
collector, algebraic datatypes, pattern matching, polymorphism, exceptions,
run-time types and safety (!). However, it already has some killer features:
. Declare and then call C functions directly.
. No 16Mb limits.
. Very fast JIT compilation (2x faster than ocamlopt).
. Easy incremental native-code compilation for a REPL.
. Efficient polymorphism.
LLVM even does a decent job of statically type checking the code, which helps
a lot when debugging (once you get used to the error messages!).
I'll probably write a front end or REPL using camlp4 and then port my ray
tracer benchmark to it. After that, I'll look at some more features:
. Algebraic data types and a kind of switch over them as a poor man's
pattern matching.
. Run-time type information and generic printing.
. Real polymorphism.
. Garbage collection.
This begs the question: what is the simplest possible concurrent GC?
Merry Christmas,
--
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e
next prev parent reply other threads:[~2008-12-22 16:57 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-19 13:04 More cores Mikkel Fahnøe Jørgensen
2008-12-19 14:04 ` [Caml-list] " Dario Teixeira
2008-12-19 15:06 ` Alexy Khrabrov
2008-12-19 15:54 ` The Axis of Eval (was: More cores) Dario Teixeira
2008-12-19 16:26 ` [Caml-list] " Paolo Donadeo
2008-12-19 17:01 ` Dario Teixeira
2008-12-19 18:01 ` Christophe Raffalli
2008-12-19 18:50 ` [Caml-list] More cores Ulf Wiger (TN/EAB)
2008-12-19 19:10 ` Richard Jones
2008-12-19 22:31 ` Jon Harrop
2008-12-19 22:36 ` Erik de Castro Lopo
2008-12-19 22:53 ` Jon Harrop
2008-12-22 17:00 ` Jon Harrop [this message]
2008-12-22 21:44 ` [Caml-list] More Caml Richard Jones
2008-12-23 6:07 ` Jon Harrop
2008-12-23 9:59 ` Jon Harrop
2008-12-23 15:32 ` Ashish Agarwal
2008-12-23 17:33 ` Jon Harrop
2008-12-24 13:12 ` Mikkel Fahnøe Jørgensen
2008-12-24 16:47 ` Jon Harrop
2008-12-23 10:04 ` Richard Jones
2008-12-23 10:38 ` Jon Harrop
2008-12-23 9:43 ` Oliver Bandel
2008-12-23 11:53 ` Jon Harrop
2008-12-19 22:42 ` [Caml-list] More cores Richard Jones
2008-12-20 19:33 ` Mikkel Fahnøe Jørgensen
2008-12-20 19:41 ` Mikkel Fahnøe Jørgensen
2008-12-19 20:37 ` Oliver Bandel
2008-12-19 21:27 ` Richard Jones
2008-12-19 22:03 ` Hezekiah M. Carty
2008-12-19 22:47 ` Richard Jones
2008-12-19 23:00 ` Alexy Khrabrov
2008-12-19 23:56 ` prelude.ml as another standard extension to Pervasives? Alexy Khrabrov
2008-12-20 1:40 ` [Caml-list] " Mikkel Fahnøe Jørgensen
2008-12-20 4:50 ` Alexy Khrabrov
2008-12-20 10:53 ` Zheng Li
2008-12-20 12:37 ` [Caml-list] More cores Richard Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200812221700.09010.jon@ffconsultancy.com \
--to=jon@ffconsultancy.com \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox