3 ms·
You say "you" multiple times, but I did not implement this other emulator: I simply found it yesterday while evaluating options for emulating armv7 on top of Ja
by saurik 10y ago
You say "you" multiple times, but I did not implement this other emulator: I simply found it yesterday while evaluating options for emulating armv7 on top of JavaScriptCore.
On the other side: this CPU emulator is written using high-level JavaScript, and I think some of its control flow is implemented using exception handling, whereas compiling Unicorn to asm.js will get reconstituted in modern broswers back to reasonable native code (and qemu is designed to be fast). I don't think it is clear cut which is faster.
(I would do a benchmark, but for my use case I actually am working with interpreted JS, which is massively different, and I had already evaluated that Unicorn.js wasn't flexible enough for my intent, so it is more of a curiosity than a question I would spend time to answer myself.)
- AlexAltea 10y agoMy bad, I realized my mistake and was editing my message right before your answer. Indeed, performance is not clear and probably depends a lot on the browser's JavaScript engine. I will try to find that out in the future with some benchmark.