4 ms·
> From what I've heard, Swift was also optimized for low memory usage rather than raw speed at a 1000 foot view, Swift inherits its reference counting system f
by WSSP 5y ago
> From what I've heard, Swift was also optimized for low memory usage rather than raw speed
at a 1000 foot view, Swift inherits its reference counting system from Objective-C, meaning objects are freed immediately when their retain count goes to zero; vs a tracing GC releasing many objects whenever a tracing cycle runs. maintaining reference counts also adds a cost that a different GC approach could avoid. it's true that Swift will maintain a lower memory footprint, potentially at the cost of lower throughput
I would be a little surprised if that explains the bulk of a performance difference though, vs Swift frameworks being newer and less optimized
- Zababa 5y agoThank you for the explanation