Being in control of object lifetimes makes a huge difference for performance-critical code. Swift’s approach to performance is “give everything an almost Python-like level of dynamism, then aggressively inline and optimize everything that’s statically known”. But this can be problematic when you know more about your object lifetimes than the compiler does.
I switched to Rust for most of my personal projects because I was working on something performance-sensitive and got really, really tired of finagling my code to try to convince the optimizer to hoist some retain/release call out of a tight loop.
I switched to Rust for most of my personal projects because I was working on something performance-sensitive and got really, really tired of finagling my code to try to convince the optimizer to hoist some retain/release call out of a tight loop.