|
HowItWorks
All Python source code is compiled into ByteCode which is executed by the virtual machine. The running virtual machine monitors certain points in the code; backwards jumps and the entry point to functions. If any of these is run more than 10 or 20 times, it becomes "warm" which means that HotPy will start optimising the bytecode. The majority of the optimisers in HotPy are bytecode-to-bytecode transformations This bytecode-to-bytecode optimisation proceeds in four stages:
The final phase in optimisation occurs when an optimised trace has been run several hundreds or thousands of times and becomes "hot". The trace is then compiled into machine code. |
► Sign in to add a comment