Also now you can run the benchmark from node:
node jspspemu_headless.js data/benchmark/benchmark.prx
This allow you to run any PSP program and see the output it produces using the stdout, also the host process exists when the guest exists. This should run with any node version in any supported host architecture including arm, mips or x86/x64.
The first version of the benchmark tests the emulator’s cpu as it is today April, 9th 2015. Featuring:
- No ASM.JS
- Memory access is behind two methods/objects, so good inlining is necessary, in browsers. It allocates a big ArrayBuffer of ~160MB, in order to be able to reach all the normal memory faster just with a single mask op. Since Node.JS doesn’t allow to allocate that memory for a single buffer, memory access in node is slower, because I have to select which buffer to use depending on the address.
- Registers uses small ArrayBuffers with Uint32Array, and Float32Array views. Without local variable allocations.
- It is just grouping simple instruction blocks in functions, except for a single branch level for simple loops (memory copying, setting, …)
- Each branch (not being a simple loop), jump, function call in the guest is returned to a main loop that lookups the new PC and generates (first time) and calls that function. So here there is most of the current work.