← Back to context

Comment by slopinthebag

15 hours ago

> CJIT is not a tracing or adaptive JIT in the VM sense. It does not interpret first and optimize hot paths later.

> CJIT uses TinyCC to compile C quickly, often in memory, and can execute the resulting code immediately.

Wait, what's the difference between this and just using tinycc directly?

   cat program.c | tcc -run -

Happy to be proven wrong here, since the project has been around for a couple years. It doesn't appear to just be a random AI one-shot thing.

Julia uses a model similar to this. The main advantage is that you can interact much more easily if you have a REPL running where you can do things (assign variables load data etc) and then define/try out new code on that data.

  • This model traces back to Lisp and how BASIC was originally designed at Dartmouth (the pure interpreter approach was a solution to fit it into 8 bit home computers).

    The best tooling approach is a mix of interpreter, dynamic and ahead of time compilers, it is a pity that not all toolchains provide this.