4 ms·
It's definitely not 4000 divisions per 4ns — that'd imply a terahertz computer. I think it's saying that the amortized cost of 4000 divisions is 4ns per divisio
by thechao 7y ago
It's definitely not 4000 divisions per 4ns — that'd imply a terahertz computer. I think it's saying that the amortized cost of 4000 divisions is 4ns per division. Small integer division is an "easy win" for a dedicated HW path, so it doesn't surprise me that it's only a little slower than a shift-right. Variable length right shifts aren't that fast.
- bonzini 7y agoIt's not small integer division that is being benchmarked, the JIT compiler has reduced it to an addition, a conditional move and a right shift. This sequence is then benchmarked against the right shift.
- saagarjha 7y agoART is an AOT complier, is it not?
- monocasa 7y agoIt's both AOT and JIT. https://source.android.com/devices/tech/dalvik/jit-compiler https://source.android.com/devices/tech/dalvik/jit-compiler
- pjmlp 7y agoWith a PGO cache updated across execution runs and devices (since Android 10 PGO data is shared across the Play Store).
- ignoramous 7y agoFor anyone like me wondering what a PGO is: https://source.android.com/devices/tech/perf/pgo https://source.android.com/devices/tech/perf/pgo