4 ms·
I have to constantly fight against rustc and LLVM to convince it to eliminate bounds check in hot loop when I'm writing high performance Rust and it's a cursed
by rfoo 2y ago
I have to constantly fight against rustc and LLVM to convince it to eliminate bounds check in hot loop when I'm writing high performance Rust and it's a cursed experience I hope nobody has to.
Other replies in this thread mentioned they have similar problems writing Go, I don't know to what extent it applies, in my limited experience working on Go codebases I never see such issues.
- pjmlp 2y agoI am writing code since 1986, in my experience most of those cases are mostly a I feel good kind of thing, and have contributed zero to the project delivery acceptance criteria. When it does in fact cause an issue with project delivery acceptance testing, the issue is solved by making use of profiling tools, and cirugically disable bounds checking, which most systems languages since the dawn of time also support.
- rfoo 2y agoWell, I would have no idea if a bounds check is eliminated at all (and who wants to care??), if it does not show up in profiling results. Unfortunately for what I do I had to do this a lot. I guess that's also why I'm not seeing it in Go, never tried to write a query engine in Go.
- pjmlp 2y agoWell, does something like CERN TDAQ/HLT count? The algorithms, networking protocols and thread scheduling are much more relevant, that the bounds checking done in the C++ data structures. As for writing query engines with bounds checking languages, there are several examples.