4 ms·
This is very straightforward code (which I wrote in 2016 before I'd even heard of RISC-V) that maps very cleanly and obviously to instructions and any gcc from
by brucehoult 3y ago
This is very straightforward code (which I wrote in 2016 before I'd even heard of RISC-V) that maps very cleanly and obviously to instructions and any gcc from the last 20 years will make essentially the same code. A large part of my goal when I wrote it was to make it far more impervious to compiler "improvements" and gaming that Dhrystone and Coremark -- and I think I succeeded very well.
The RISC-V B extension's `sh2add` and friends make a small difference -- that's basically the 2.7% gap between the VisionFive 2 and the HiFive Unmatched. If I disable Zba on the VF2 then the times are just about identical.