4 ms·
> without a big performance hit. You might be surprised (I was). Most of the benchmarks I’ve seen place it more in the neighborhood of golang and v8, rather t
by cellularmitosis 3y ago
> without a big performance hit.
You might be surprised (I was). Most of the benchmarks I’ve seen place it more in the neighborhood of golang and v8, rather than the C, C++, rust neighborhood you might expect.
Another commenter in this thread highlighted that the ref-counting GC is what keeps it out of the C / Rust performance neighborhood.
- aatd86 3y agoI remember seeing a few benchmarks where v8 and go were competitive or sometimes even slightly more performant. So not even sure that GC has always a perf cost is always true. Not saying it doesn't in some cases, just so that we are clear but the truth seems to be more nuanced.
- pkulak 3y agoRef-counting GC is pretty slow. It’s great for avoiding stop-the-world pauses, which can be really important for UI stuff like what Swift is used for, but you won’t win any throughput awards.
- scns 3y agoSo well engineered for its use case. Was Go optimized for throughput?
- retendo 3y agoSwift doesn't have a GC. The automatic reference counting is a feature that just inserts retain/release statements at compile time, so there is no additional process that handles that. I would suspect that the performance hits originate from other things.
- frizlab 3y agoARC is a type of GC though.
- deleted 3y ago[deleted]
- cellularmitosis 3y agoI don’t see a lot of utility in policing an overly narrow definition of what constitutes garbage collection.