Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: