4 ms·
I figured, but I guess I don't understand this argument then. SQLite as a project already spends a lot of time on quality so doing some `unsafe` blocks with a `
by hypeatei 1y ago
I figured, but I guess I don't understand this argument then. SQLite as a project already spends a lot of time on quality so doing some `unsafe` blocks with a `// SAFETY:` comment doesn't seem unreasonable if they want to avoid the compiler inserting a panic branch for bounds checks.
- Ferret7446 1y agoIf you put unsafe around almost all of your code (array indexing) aren't you better off just writing C?
- aw1621107 1y agoPerhaps if the only thing you're doing is array indexing? Though I'm not sure that would apply in this particular case anyways.
- tomjakubowski 1y agoIn many cases LLVM can prove the bounds check is redundant or otherwise is unnecessary and will optimize it away.