2 ms·
Asymptotics aren't a practical bound on anything - a function documented as being O(1) could still take ten thousand years. In practice outside of hard realtime
by lmm 11y ago
Asymptotics aren't a practical bound on anything - a function documented as being O(1) could still take ten thousand years. In practice outside of hard realtime systems all functions are best-effort and we confirm acceptable performance empirically rather than having any explicit guarantees. I do think a language that made it explicit exactly how long any given function would take would be a good thing, but that would be a much bigger undertaking than Rust's borrow checker.