|
|
|
|
|
by Scaevolus
33 days ago
|
|
The absolutely easiest way to write a JIT is to use Javascript and eval() (or "new Function()", which is just eval in a Java-shaped tuxedo). You can quite easily speed up little matching functions, especially arithmetic heavy ones, by just filling in some templates at runtime! Here's an example used in PuzzleScript: https://github.com/increpare/PuzzleScript/blob/dc1e0fc979365... |
|
For example, this PSX emulator: https://github.com/kootstra-rene/enge-js
It has decent compatibility and good speed. Furthermore, I challenge anyone to find a PSX emulator with fewer lines of code with competitive speed and accuracy. To my knowledge, this is by far the simplest such implementation, and is able to do this by taking advantage of Javascript JIT compilation.