
Nash – A tracing JIT compiler for Scheme [pdf] - jsnell
http://scheme2016.snow-fort.org/static/scheme16-paper3.pdf
======
Johnny_Brahms
What's most impressive about Nash is that it is a one man show. I don't thing
any of the guile devs knew about Nash when Atshro stood up and introduced it
at scheme workshop 2016.

There was talk about merging it, but I dont know what happened with that. We
moved to chez at work, so we sort of lost interest.

~~~
sabauma
Chez is pretty tough to compete with in terms of Scheme performance. On the
benchmarks presented in the paper, Chez averages faster than all the systems
presented, even Pycket post warmup. Its not the fastest on every benchmark,
but gives consistently good performance without huge warmup time, which is
Pycket's biggest weakness. With Racket planning to switch over to Chez, it may
be difficult to justify Pycket's existence, especially if some of Chez's known
performance sore spots receive attention.

~~~
throwaway7645
Is Chez AOT compiled or JIT based? If it is AOT, would the REPL still be
interpreted and just a finished program AOT compiled?

~~~
sabauma
Chez is an AOT compiler. I am not sure how the REPL operates, but I believe it
just compiles expression on the fly before executing them. I suppose you could
characterize that as JIT compilation, but the optimizer does not make use of
any runtime profiling information. Racket's "JIT" is similar in that code is
generated for a function when it is first called, but the optimizer is run on
the bytecodes of the program before anything is run.

~~~
fiddlerwoaroof
In Common Lisp it's fairly common for eval to compile the code and then
execute it. For example, sbcl's repl usually compiles the entered expression
and then executes it: although recent versions also provide an interpreted
mode.

------
CoffeeDregs
Would transpiling Scheme to Javascript and then executing the resulting
Javascript on NodeJS give good performance?

~~~
tonyg
In principle, maybe; in practice, currently, no: Scheme requires proper tail
calls, and Javascript engines as a rule do not provide them. Yet.

~~~
e12e
Wouldn't _any_ scheme runtime/compiler need to handle that, though? In other
words, wouldn't a transform to a loop (on the js side) be one possible
approach?

~~~
ufo
Only if you know at compilation time what function(s) you will be calling in a
tail recursive manner. If the function you call comes from a parameter or
variable (for example, in continuation passing style code) then there is no
straightforward way to compile it into a loop.

