-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Severe Performance Loss (450x) in Unicorn ARM64-to-ARM64 Emulation on Android? #2168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The slowdown is expected but 450x sounds too much for me. How to reproduce? |
Native code executed the looptest natively and simulated the looptest via Unicorn, then output the time difference. According to the log, the time difference is 500x. the unicorn is https://github.com/saicao/unicorn/tree/master patched by saicao last year. this Is log
this code
|
saicao’s patch wasn’t correct. You should try current dev/master instead. |
I try the dev branch. there is the new log. The performance loss reaches 450x
|
Are you sure this is correct? I doubt that the
But this is still not complete correct, because |
the ret of looptest exactly looptest+0x50 in ida |
I sometimes used this approach for very quick testing. By using the flags like |
When using Unicorn Engine to emulate ARM64 code on an Android ARM64 device, the performance loss reaches 450x even with no hooks enabled. This seems abnormally high for same-architecture emulation.
Is this normal? If not, what are the possible reasons?
The code is
extern "C" int64_t looptest(){ int64_t j=0; for (int64_t i=0;i<1000000;i++){ j+=1; } return j; }
The text was updated successfully, but these errors were encountered: