I checked th Pyston website, it essentially says it makes your code faster and nothing about what's the catch and how it magically works.
I checked th Pyston website, it essentially says it makes your code faster and nothing about what's the catch and how it magically works.
Now, you need to have a conversation with someone who only speaks Chinese. How do you do that? Well, you use an interpreter. They listen to what you say, and translate it to Chinese and speak on your behalf.
If you never had any interest in learning Chinese, this would be sufficient. Your conversation rate would be slow but it would get the job done.
Let's say there's an intense line of yes-or-no questioning, though. You need to say "yes" or "no" often, and decide that maybe learning the equivalent Chinese words or phrases would cut out the middleman, thus speeding up conversation in some cases.
This is what a JIT does, just replace English with Python's bytecode, and Chinese with your host CPU's architecture (e.g. x86 or ARM). The "when" of JITing code varies across implementations and approaches but the concept remains the same. Oftentimes the JIT runtime will translate just the hot codepaths.
If a compiler - e.g. one that compiles C code - is "ahead of time", then a runtime that compiles on the fly does so "just in time".
Not all of the code gets transformed this way so the speedup is modest.
Since profiling and translation take time, it benefits mostly long-running code, especially servers, and is less useful for transient utilities.
The compiled parts don't need to run line by line through the interpreter loop anymore: they're already in memory in cpu-executable form.
And (don't know if it does) could even create dedicated faster code for parts of your code, if it can guess the types it works with.
More generally all the profiling and whatnot is much more complicated and so everything that entails.
But Julia's warmup time should serve as a warning: the expertise you claim exists has not saved major projects from the drawbacks of JIT.
It's also based on LLVM, which historically has been slow and crap for JIT work.
There are Jitted languages that run circles on top of Python on running time and even startup time.
Iirc, V8 has several layers of smarts to deal with this.