Re:Google assigns a CVE for libwebp and gives it a 10.0 score
by antiframe on Tuesday September 26, 2023 @11:03AM
(#37660428)
Rusts bounds checking is done at compile time, so you don't need to turn it off.
[ Parent
| on HN ]
Re:Google assigns a CVE for libwebp and gives it a 10.0 score
by flooow on Tuesday September 26, 2023 @11:25AM
(#37660733)
Incorrect. Semantically, Rust always inserts runtime bounds-checks, regardless of optimization level. The compiler _may_ then remove them as part of an optimization pass, iff it can prove the check is redundant.
Do bounds checks even matter, even for very tight loops? This article [1] seems to suggest that removing the checks can give up to 10-15% speed increase under some circumstances. Worth it? I'd say no.
[1] https://dropbox.tech/infrastructure/lossless-compression-wit...