News for hackers. Stuff that matters.
Re:Eliminating Memory Safety Vulnerabilities at the Source by GeekyBear on Friday September 27, 2024 @01:48PM (#41673548)
Reference counting doesn't have the same cost as a sweeping garbage collector.

Apple has also optimized their custom ARM core to further reduce the cost.

> retaining and releasing an NSObject takes ~30 nanoseconds on current gen Intel, and ~6.5 nanoseconds on an M1

https://blog.metaobject.com/2020/11/m1-memory-and-performanc...

That said, Swift is working toward adding a future opt-in Rust inspired approache to memory management for those who need it.

https://forums.swift.org/t/manifesto-ownership/5212

https://forums.swift.org/t/a-roadmap-for-improving-swift-per...

There are no comments on this comment yet.