4 ms·
> No, but new javascript programs are frequently loaded. This is probably what confuses a lot of people into thinking that program distribution has anything to
by sedachv 5y ago
> No, but new javascript programs are frequently loaded.
This is probably what confuses a lot of people into thinking that program distribution has anything to do with JIT. JavaScript is the only programming language for which the main method of program distribution is source-code-only, and why all the trade-offs of adaptive optimization seem necessary, to the point that now people are making its necessity into a virtue. Likewise for Java stealing credit for popularizing portable bytecode as the main method of program distribution - although Gosling coined the term JIT years before Java had a JIT compiler.
> If (for instance) I write a script in c and run it with tcc -run
And what happens when you use libtcc?
> Compilation should occur concurrently with execution
Execution of what? You do not need an interpreter or a bytecode VM to have a JIT compiler.
> usually accompanied by some heuristic for deciding what to compile first (e.g. tracing)
That is adaptive optimization, and is orthogonal to compiling (you can have adaptive optimizations in an interpreter or a bytecode VM). Tracing (which is not a heuristic btw) is a variation of profile-guided optimization, which is orthogonal to JIT.
> Even if it is not, however, ECL does not JIT c, but produces it statically.
I posted this elsewhere in this thread:
https://gitlab.com/embeddable-common-lisp/ecl/-/blob/develop/src/cmp/cmpmain.lsp#L732 https://gitlab.com/embeddable-common-lisp/ecl/-/blob/develop...
Can you explain why you think that is not a JIT.