3 ms·
Maybe not the ones with GC?
by mamcx 7y ago
Maybe not the ones with GC?
- pjmlp 7y agoSwift also has a GC by CS definition of automatic memory management algorithms.
- skohan 7y agoSwift's ARC is also really slow compared to a lot of GC implementations, largely because it relies on a lot of atomic operations in order to work in a thread-safe manner. It does have positive characteristics in that it's much more memory efficient than a lot of GC solutions. Also it's deterministic, which will be appreciated by anyone who's had to deal with Stop-the-world garbage collectors. It's also possible to avoid a lot of ARC overhead by avoiding reference types, which is often quite tenable due to Swift's robust support for value types. Also there's a lot of low-hanging fruit for how ARC could be optimized to cut into that overhead. Anyway, not quite sure what I'm getting at, but the memory management story with Swift is interesting.
- mamcx 7y agoWhat you say, in other words, is that swift is biased to run on iOS. I think the tradeoff are rigth and work well in practique. Probably if swift get more traction in server side, is where the difference from GC (that in other words, are BATCH ORIENTED memory managers vs SCALAR ORIENTED) then the need to improved things will show up.