Commit c1e06dc
committed
Fix very slow emulation speed under Emscripten
The use of setjmp/longjmp to handle PPC exceptions results in WASM <-> JS
jumps in generated Emscripten code. This should be fine (because there are
not a lot of exceptions), but for reasons that I don't fully understand,
we were crossing that boundary for every single instruction.
Work around this by not allowing ppc_exec_inner to be inlined, which adds
another function on the callstack and appears to keep the execution
entirely on the WASM side.
Timing of booting the 7.1.2 Disk Tools floppy:
Before After
Happy Mac 43s 17s
Welcome to Power Macintosh 62s 24s
Desktop Appears 100s 38s
Finder is running 192s 70s1 parent f16b81e commit c1e06dc
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
325 | 332 | | |
326 | 333 | | |
327 | 334 | | |
| |||
0 commit comments