I am running a simple AES encryption operation both on desktop(using core i7 processor, 16GB Ram, eclipse and JDK8) and mobile(Android emulator using Intel atom X84 processor 2 GB ram, Android 6.0). I am surprised with the result when mobile emulator took significantly less time than desktop for encryption operation with same amount of data and same key. Could anybody explain why it is happening?
Be adviced benchmarking (and micro-bechmarking) is a very tricky domain.
You need to consider startup, warmup, I/O time.. So there are a lot of factors involved you haven't stated. AES encryption itself is serial operation so it all comes down to CPU speed or HW support of AES operations. My guess would be the emulator app and data are loaded in RAM, while on the desktop you have to read it from the disk.
AES has even very nice property (if someone recalls the name, please comment) the implementation could use relatively small amount of memory for limited devices or for more powerful platforms the shift and mix operations can be translated to lookup tables so the operation is faster but it requires more RAM and the preparation time (warmup) may be longer. (I am not sure what is used in the Android libraries)
So - summing up - to get better answer you'd have to provide more information and prepare the benchmarking well.
The disparity is just between the implementations. If you have a Java method, and an emulator that used the hardware AES blocks, you should see only a difference based on CPU speed because in both cases, completion takes 14 cycles. The overview of AES-NI will get you more information.
It's just probably a function of how the JVM is implemented combined with the classes, but from a hardware perspective, it should basically be the same.