3 ms·
Swift's GC is really a lot closer to modern C++ style memory management than the other languages you mentioned. If you use RAII & shared_ptr in C++ you are usin
by biggestdecision 7y ago
Swift's GC is really a lot closer to modern C++ style memory management than the other languages you mentioned. If you use RAII & shared_ptr in C++ you are using the exact same techniques that Swift's "GC" uses.
- pjmlp 7y agoAnd as proven by the ixy paper, quite slow versus tracing GCs.
- biggestdecision 7y agoI assume this is what you are talking about? https://www.net.in.tum.de/fileadmin/bibtex/publications/papers/the-case-for-writing-network-drivers-in-high-level-languages.pdf https://www.net.in.tum.de/fileadmin/bibtex/publications/pape... >A total of 76% of the CPU time is spent incrementing and decrementing reference counters. ouch
- pjmlp 7y agoYep, that one.
- im3w1l 7y agoMaybe. But shared_ptr should only be used very sparingly. Almost all objects should be stack or unique_ptr.