|
|
|
|
|
by jpfau
4995 days ago
|
|
I tried writing an ARM -> JS recompiler, but my initial tests showed that the slow games tended to re-copy the portions of code that were slow back into their working RAM, causing me to invalidate the recompiled code. Maybe I could get clever and detect when I don't need to invalidate the recompiled code, but I have a feeling that that would actually slow it down overall. Haven't tried this yet, though, so who can say? What I did observe is that the games that DON'T invalidate the recompiled code tended to run ~20% slower, so I'm not really sure what I was doing wrong there. It mostly seems to be that the code my recompiler is outputting is less well optimized by the JIT, and not that the recompilation is too slow. It's also possible that my recompilation is screwing over the garbage collector, as I have a somewhat verbose intermediate representation that I created in the hopes that I could optimize the recompiled code. I don't have much experience with compilers though, and again, I never got around to this. I've been pondering pushing the branch that I did this work on, but I was hoping to wait until I got it to perform better before pushing it. |
|