4 ms·
I guess that's an thorough way of saying "The problem with building a library is supporting all the use cases of a library, not solving the simple underlying pr
by Traster 5y ago
I guess that's an thorough way of saying "The problem with building a library is supporting all the use cases of a library, not solving the simple underlying problem". Sure, you've got BLAS level performance on this one CPU, but you've literally hard coded stuff according to the exact cache size of each of your caches and the exact low level ISA extensions your CPU has. I think it would have been far more interesting to take this and then put it on a Threadripper to see "Given I've optimized the hell out of this for one CPU, how portable is it".
- d_tr 5y agoTrue, and this operation is close to as simple as it gets.
- paulsutter 5y agoThe solution is code generation based on CPU parameters, not general portable code
- jcranberry 5y agoCache sizes can be gotten programatically. I don't see that as an impediment. Would need to be benchmarked of course to see how that affects performance.
- henrydark 5y agoEigen does this
- mkbosmans 5y agoSure, but that doesn't change the fact that you cannot simply plug that into a simple formula to get the e.g. the optimal block size for cache-blocking. To be more precise: you can try to figure out how cache size would affect optimal block size in theory and in practice this gets you pretty decent performance. But to get the last bit of performance out of the hardware you need to benchmark several configurations on the hardware and select the best one based on run time parameters like u-arch and cache size.