Am Mittwoch, 6. Mai 2020 schrieb <andr...@itship.ch>:

> Read Wikipedia:
>
> LLVM allows code to be compiled statically, as it is under the
traditional GCC system, or left for late-compiling from the IR to machine
code via just-in-time compilation (JIT)

Wikipedia might have missed the chapter: "Extreme Laziness - Using Compile
Callbacks to JIT from ASTs".

Since the AST (Abstract Syntax Tree) in any Lisp is changing all the time,
the JIT engine *has to* post-jit continuously to keep up the full execution
speed.

That's what will give pil21 a real performance boost over over any 'static
compiled' implementation.

Means: PicoLisp will continuously check its own AST for changes (diff) and
then ASAP recompile what's necessary in the background on a second CPU.

But that also means: pil21 "binary" size will become much larger, since it
will contain the processor specific ASTtoMachine Code parts.

But, indeed, you can also use LLVM and Clang to compile the C version of
Picolisp as usual, 'statically'. But that's almost pure nonsense, gives you
no real advantage over e.g. GCC .

You may also compile PicoLisp C version on ployglot (many programming
languages in one source) GraalVM (Truffle) and observe, how PicoLisp gets
faster and faster after a certain warm up time. GraalVM (Truffle) is same
HotSpot post JIT optimization concept.

Have fun!

Reply via email to