Hakan's experimental high performance port

91 views
Skip to first unread message

Mark Tarver

unread,
Apr 5, 2013, 7:16:21 AM4/5/13
to Qilang
I thought I'd flag this. This is Hakan's *experimental* port of
Shen. I've written to him; he is busy until May in Goa (which is
certainly warmer than England right now). I believe he is looking
forward to the finalisation of the KLambda test suite from Greg.

The following is taken from the Github page. Any queries to Hakan.

QUOTE
Shen.java is an invokedynamic based K Lambda compiler. I don't vouch
for any of the implementation details regarding this - I'm learning as
we go. All code lives in Shen.java. It passes the Shen test suite.

This port is loosely based on shen.clj, but has no dependency on
Clojure. Started as an interpreter using MethodHandles as a primitive.
It's about 2x faster than shen.clj.

This is pretty experimental, and this entire project acts as a
playground for various JDK 8 and JVM language stuff. There's an
IntelliJ project, which requires IDEA 12 and JDK 8 with Lambda support
( there are often small but breaking changes). It's based on this
Maven project.
UNQUOTE

I've looked at it; it seems to run under Linux and on the download
page I've listed it as such. It is listed as 'Java B'.

Mark

jo...@mentics.com

unread,
Apr 5, 2013, 10:11:16 AM4/5/13
to qil...@googlegroups.com
On Fri, Apr 5, 2013 at 4:16 AM, Mark Tarver <dr.mt...@gmail.com> wrote:
> I thought I'd flag this. This is Hakan's *experimental* port of
> Shen. I've written to him; he is busy until May in Goa (which is
> certainly warmer than England right now). I believe he is looking
> forward to the finalisation of the KLambda test suite from Greg.

I'm certainly looking forward to that, too. It will be a great help to
have a comprehensive test suite.


> I've looked at it; it seems to run under Linux and on the download
> page I've listed it as such. It is listed as 'Java B'.

It would be more accurate to refer to it as a JVM port rather than a
Java port. He's emitting bytecode directly, so there's no Java
involved.

It's interesting you refer to it as a "high performance" port. How
does it's speed compare to shen-clisp? For just running compiled code,
my port *should* be faster than Hakan's, but if there is much dynamic
evaluation going on, Hakan's will be faster. Source gen+compiling will
never be as fast as direct bytecode emitting. That was a deliberate
choice of mine since I'm looking at optimizing production which
typically doesn't involve much dynamic evaluation. The benchmarks
included in Shen involve a lot of eval'ing. Once I get my port
switched over to use the eclipse compiler, it'll be interesting to see
how it does. What will be much more interesting will be when we have
type information so I can hopefully generate optimized code and avoid
all the boxing and casts that are required without it.
Reply all
Reply to author
Forward
0 new messages