3 ms·
I'd say it mostly applies to manual optimization, when we're restructuring our program. If the situation calls for a B-tree, the borrow checker loves that. If
by verdagon 3y ago
I'd say it mostly applies to manual optimization, when we're restructuring our program.
If the situation calls for a B-tree, the borrow checker loves that. If the situation calls for some sort of intrusive or self-referential data structure (like in https://lwn.net/Articles/907876/ https://lwn.net/Articles/907876/), then you might have to retreat to a different data structure which could incur more bounds checking, hasher costs, or expansion costs.
It's probably not worth worrying about most the time, unless you're in a very performance-sensitive situation.