[plt-scheme] llvm and all that

From: Noel Welsh (noelwelsh at yahoo.com)
Date: Thu Aug 10 09:27:43 EDT 2006

Hi all,

A question about tools for compilers and so on.

If you don't have much time:

What tools are available for writing compilers from
(subsets of) MzScheme to something faster?  For example, is
there a binding to LLVM?  I know someone was working on a
LLVM compiler a while ago.

If you have more time:

The problem:

I have some code that is too slow.  It is a mix between
symbolic and numeric code (fitting Markov models to data
(but not maximum likelihood -- I allow the number of states
to change)).  I use SRFI 42 eager comprehensions at lot. 
It makes my code very concise and I like that.

Possible solutions:

 - Write critical parts in C.  Possible but boring

 - Write critical parts in O'Caml.  More fun to write, but
honestly O'Caml isn't much more fun than C for numeric
computation (no array comprehensions) and binding MzScheme
to O'Caml is more work

 - Write critical parts in Single Assignment C. 
Interesting, but documentation is almost non-existant.

 - Write a custom compiler for the critical parts.  Much
more fun!  I already have the beginnings of a PowerPC
assembler, but this is a dead platform now.  I really want
something portable.  LLVM is the obvious choice.  There
might be others.

Many thanks!

Email: noelwelsh <at> yahoo <dot> com   noel <at> untyped <dot> com
AIM: noelhwelsh
Blogs: http://monospaced.blogspot.com/  http://www.untyped.com/untyping/

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

Posted on the users mailing list.