Skip to content
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

JNI Performance #3

Open
Kuanlin-Chen opened this issue Oct 13, 2016 · 0 comments
Open

JNI Performance #3

Kuanlin-Chen opened this issue Oct 13, 2016 · 0 comments

Comments

@Kuanlin-Chen
Copy link

I added the code in MainActivity to test the performance.

long start = System.currentTimeMillis();
for(int i=0; i<10000; i++)
{
data = AESCryptor.crypt(data, System.currentTimeMillis(), 0);
}
long end = System.currentTimeMillis();
System.out.println("JNI_AESCryptor Time="+(end-start));

And I got about 43 second each time.
But the JavaAESCryptor.encrypt always ran about 7 second.

What makes these happening?
Maybe my test method was wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant