Martin Gregorie writes:
> Ahem A Rivet's Shot wrote:
>> Another common approach with BASIC was semi-compiled where
>> statements would be compiled on the fly as they were encountered and
>> a cache kept of compiled statements - the first target when memory
>> runs short of course. The earliest of these caused some consternation
>> as they performed unreasonably well on benchmarks which were mostly
>> short loops and were thus fully compiled after the first iteration.
>
> The only place where I know that approach is used currently is the JIT
> optimising compiler in depths of the Java JVM.
It’s a common strategy. Other examples are CLR implementations and
QEMU. Modern x86 CPUs do something conceptually very similar, caching
micro-ops rather than (only) architectural instructions.
--
https://www.greenend.org.uk/rjk/
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|