SHA-512 Hashing Speed in Java: 2019 Mac Pro, 2019 iMac 5K, 2020 iMac 5K, 2021 MacBook Pro M1 Max
re: Apple M1 Macs: Not a Mature Solution for General Usage eg Java Virtual Machine
The Apple MacBook Pro M1 Max is apaprently a speed demon so long as the software gets it right. But since B&H Photo has been as yet unable to deliver a test unit, I’ve not been able to see just how well it performs. Figures below from a remote tester.
But at least one area of functionality is not well supported: hashing speed in Java, not even with a native JDK.
I tested hashing speed on 4 top-end Macs ("icj sha")—pure memory hashing, no I/O involved.
- The 28-core 2019 Mac Pro kicks butt versus the other machines, as it ought to. But neither it nor the other Mac scale linearly with threads, which is probably a memory bandwidth throttling effect.
- The 2020 iMac 5K performs marginally better than the 2019 iMac 5K using 8 cores, and its 10 cores offer quite a bit higher throughput vs 8 cores. But in real-world tests with IntegrityChecker Java, it is actually no faster, apparently due to slower read speeds from its SSD.
- The MacBook Pro M1 Max is pitiably slow at the SHA-512 hash (and all hash functions)—slower than even the 2015 MacBook Pro 4-core (MBP M1 Max needs 6 cores to slightly beat 4 cores!). It’s unclear if this is due to lack of native support for hashing, or whether (unlike Intel), support for hashing is just poor on the M1 CPU. Below, the red line is the MacBook Pro M1 Max. Its two efficiency cores have only ~12% to add over the eight performance cores.
The foregoing is not a suggestion that the MacBook Pro M1 Max is slower than these Macs in general (quite the reverse). But it shows that in at least one context it can be a grossly inferior performer.