4 ms·
Sorry about the naive question, but if the memory management overhead is worse in Swift, is the hardware it runs on typically better? I'm assuming some of this
by etse 6y ago
Sorry about the naive question, but if the memory management overhead is worse in Swift, is the hardware it runs on typically better? I'm assuming some of this because I've noticed Android devices tend to require more CPU/memory compared to iOS devices in the same generation.
- ken 6y agohttps://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160208/009422.html https://lists.swift.org/pipermail/swift-evolution/Week-of-Mo... Lattner on Swift (2016): "...while it is true that modern GC's can provide high performance, they can only do that when they are granted much more memory than the process is actually using. Generally, unless you give the GC 3-4x more memory than is needed, you’ll get thrashing and incredibly poor performance..."
- aidenn0 6y agoAgreed. I would say 2x the heap size is table-stakes for high-performance tracing GC, and the more you give it the better performance you can get.
- flumpcakes 6y agoApparently the custom processors used in iOS devices are actually some of the fastest out there in that form factor. Designed by apple (I think using ARM instruction set) and made using some of the latest, most advanaced, process nodes by TMSC. If you look at raw benchmarks, they handidly beat the best Qualcom/"android SOC" chips out there. I think this changes very rapidly - given the market segment of high end phones has a yearly turn around. However, I did read an article today that claimed the "cheapest iPhone" (the new SE model) is faster than the most expensive android phone currently out there.
- saagarjha 6y ago> I think this changes very rapidly Apple has been leading the mobile processor market by quite a bit for the last five years.
- jayd16 6y agoThere are a lot of factors at play. Some technical like OS differences, and some non-technical like race to bottom spec pushing by Android OEMs.
- saagarjha 6y agoSwift is currently missing some optimizations that would allow for better knowledge of object lifetimes and potential elision of refcount updates.