3 ms·
Some of the most interesting benchmarks here: Dhrystone 2: 253.2 on the Mango Pi MQ Pro, 202 on the Raspberry Pi Zero. I don't know what this number is; presu
by kragen 4y ago
Some of the most interesting benchmarks here:
Dhrystone 2: 253.2 on the Mango Pi MQ Pro, 202 on the Raspberry Pi Zero. I don't know what this number is; presumably it's not Dhrystone MIPS (VAX MIPS), because that should be closer to 1000 for both chips, and it can't possibly be Dhrystones per second, because a VAX MIPS is 1757 Dhrystones per second, so they ought to be about 1.8 million Dhrystones per second. Reading https://github.com/kdlucas/byte-unixbench/blob/master/UnixBench/src/dhry_2.c https://github.com/kdlucas/byte-unixbench/blob/master/UnixBe... leaves me no wiser.
File Copy 1024: 124.4 on the MQ Pro, 86 on the Raspberry Pi Zero. The UnixBench README says this is measured in the number of characters that can be written, read, and copied in 10 seconds; if this were correct it would mean the MQ Pro were copying 12.4 bytes per second and the Raspberry Pi Zero W was copying 8.6 bytes per second. It seems inescapable that Bret's results are incorrect by several orders of magnitude here.
C copy backwards: 1197.4 MB/s (not MiB/s as I previously read incorrectly) on the MQ Pro, 157.2 on the Zero W. Something went wrong here.
Standard memcpy: 1200.9 MB/s on the MQ Pro, 424.8 on the Zero W.
Standard memset: 2650.6 MB/s on the MQ Pro, 1699.9 on the Zero W. This seems surprisingly slow; you'd think an 8x-unrolled loop of SD instructions on a 1GHz RISC-V would memset about 5 gigabytes per second, if it got one instruction per clock, which it normally ought to. The XuanTie C906 core in the AllWinner D1 C906 is 64-bit, which is potentially an advantage for this; the analogous code for ARM6 can only write 32 bits per instruction. (The ARM has an STM instruction that stores multiple registers, but it doesn't actually run faster.) I'm not sure what happened to the extra factor of 2 in performance. Similar remarks apply to the memcpy results above.
Amazon Basics 64GB MicroSD card: MQ Pro reads sequentially at 11.48 MB/s, writes sequentially at 10.77 MB/s; Zero W reads sequentially at 21.36 MB/s, writes sequentially at 19.6 MB/s. (I'm ignoring the random reads and writes because he doesn't specify the read and write size, yet he gives the results in MB/s instead of IOPS.) Note that these are six orders of magnitude faster than the 12.4 and 8.6 bytes per second given earlier.
Unfortunately Weber doesn't link to the benchmark code or document his compilation and execution environment. Presumably the memset and memcpy results are largely measuring the performance of the libc functions, for example, so reproducing them would require knowing if he's using glibc, musl, or a C library he wrote himself.
Mostly I feel like these benchmarking results are not well enough specified to be useful, which is a shame. I'd like to be able to use this kind of benchmark to predict the performance of a system within a factor of 5 or so, but these results are too irreproducible for that.
- pca006132 4y agoFor memcpy and memset, they are usually memory bound, so it isn't surprising that it doesn't get to 1 instruction per clock. I wonder if this is due to slow memory instead.
- kragen 4y agoSeems likely. Or maybe they don't have any cache and so it's spending half the memory bandwidth on instruction fetch? That can't be the Pi's excuse, though.
- brucehoult 4y agoI did my own memcpy() benchmark on the first D1 board back in April 2021. https://hoult.org/d1_memcpy.txt https://hoult.org/d1_memcpy.txt I got about the same speed (1100 MB/s) for huge in-RAM copies. The in-cache speed peaked at 3771 MB/s for an 8 KB copy with custom code (shown on that page) using the D1's 128 bit vector registers, 2058 MB/s using the standard glibc function. 150 to 400 MB/s on the Pi Zero is very believable. The D1 is pretty strong RAM performance. The HiFive Unmatched was about 180 MB/s when I tested it. You need top-end DRAM controller IP and also a prefetch engine to get the good read speeds, and it's no surprise if an ARM11 doesn't have that. SiFive also doesn't have it on their self-produced chips. Hopefully Horse Creek has the good Intel IP for peripherals and RAM. I have no idea what's going on with the Dhrystone. SiFive's in-order single-issue RISC-V cores get about 1.6 DMIPS/MHz on 32 bit cores, 1.7 on 64 bit cores. I haven't measured but I'd expect the C906 to also be around 1.7 i.e. 1700 VAX MIPS at 1 GHz.
- kragen 4y agoThis is great information, thank you! I hope SiFive's chips have improved too; I look forward to seeing the Horse Creek results. 1 GB/s or even 4 GB/s is still pretty anemic for single-computer laptops, but an order of magnitude improvement over Unmatched is great news.