Re:Resource efficient Thread Pools with Zig
by kprotty on Tuesday September 14, 2021 @10:13AM
(#28525137)
The results will vary on different systems given how the combination of the CPU and OS handle thread synchronization + scheduling. On one of my desktops running Windows 10 with an i7-4790k, the Go qsort runs slower (~600ms) than the Rust qsort (~490ms) while on Linux systems the results are generally the opposite.
The zig thread pool appears consistently faster for this benchmark on different systems, and rayon::join appears consistently faster than the zig thread pool on different systems too. I believe you can somewhat conclude the advantages of their designs from this relative to each other rather than in an absolute sense.
Right! This was a misunderstanding of mine. Updated results:
8-thread Intel laptop machine:
32-thread AMD workstation: The reason why I think that conclusions should not be drawn due to the excessive variability between systems.On the parent poster's system, zig is faster by a much larger margin than the two systems I've tried. And there's a ~45% difference in Go's performance compared to the fastest runner for the respective system.