| ▲ | sesm 5 hours ago | |||||||
IDK about Fil-C, but in Java garbage collector actually speeds up memory management compared to C++ if you measure the throughput. The cost of this is increased worst-case latency. A CLI tool (which most POSIX tools are) would pick throughput over latency any time. | ||||||||
| ▲ | zozbot234 4 hours ago | parent | next [-] | |||||||
You also pay for the increased throughput with significant memory overhead, in addition to worst-case latency. | ||||||||
| ||||||||
| ▲ | dataflow 4 hours ago | parent | prev | next [-] | |||||||
> in Java garbage collector actually speeds up memory management compared to C++ if you measure the throughput If I had a dollar for every time somebody repeated this without real-world benchmarks to back it up... | ||||||||
| ▲ | wavemode 3 hours ago | parent | prev | next [-] | |||||||
Java (w/ the JIT warmed up) could possibly be faster than C++, if the C++ program were to allocate every single value on the heap. But you're never going to encounter a C++ program that does that, since it makes no sense. | ||||||||
| ▲ | CyberDildonics 3 hours ago | parent | prev [-] | |||||||
I see this claim all the time without evidence, but it's also apples and oranges. In C++ you can avoid heap allocations so they are rare and large. In java you end up with non stop small heap allocations which is exactly what you try to avoid when you want a program to be fast. Basically java gc is a solution to a problem that shouldn't exist. | ||||||||