top | item 28665633

(no title)

WSSP | 4 years 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

discuss

order

Zababa|4 years ago

Thank you for the explanation