Version française
Home     About     Download     Resources     Contact us    
Browse thread
MinCaml: an educational compiler for tiny ML subset (documented in Japanese)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Eijiro Sumii <eijiro_sumii@a...>
Subject: MinCaml: an educational compiler for tiny ML subset (documented in Japanese)
Hi,

I have implemented a simple but efficient compiler from a tiny ML
subset to the SPARC assembly language.

  http://min-caml.sourceforge.net/min-caml.tar.gz

The primary purpose is advanced education: the compiler is well
documented (only in Japanese for now, unfortunately)

  http://min-caml.sourceforge.net/

and has been used in a class at Tokyo for years.

The compiler consists of only 2000 lines of OCaml.  Yet, it produces
as efficient SPARC code as OCaml and GCC does (for the tiny ML subset
and equivalent C programs).

  A typical functional program (Ackermann):

    GCC 6.8s
    OCaml 0.9s
    MinCaml 0.9s

  A typical imperative program (raytracing):

    GCC 14.7s
    OCaml 36.7s (could perhaps be improved by using BigArray)
    MinCaml 17.0s

So, please take a look if you are interested.  Even if you don't
understand Japanese, you may be able to understand OCaml!:-)

Best,

--
Eijiro Sumii (http://www.cis.upenn.edu/~sumii/)
Department of Computer and Information Science, University of Pennsylvania