9 ms·
C, Nim and Zig all benefit from static allocation and it's available in rust, so seems fair? also, `const N` is used in rust's nqueen test, so figured it would
by spense 3y ago
C, Nim and Zig all benefit from static allocation and it's available in rust, so seems fair?
also, `const N` is used in rust's nqueen test, so figured it would be fine.
someone posted an `.iter().zip()` solution which benchmarks only a little slower (+10ms) than static allocation:
https://github.com/attractivechaos/plb2/pull/4#issuecomment-1875298577 https://github.com/attractivechaos/plb2/pull/4#issuecomment-...
- Aissen 3y agoI only looked at the C version, and it didn't use a generic over the allocation size, although yes, technically it was fixed at compile time. I saw the update to the PR, but I still prefer my collect()-based version :-)