2 ms·
That hasn't been my experience at all. The JVM garbage collector kicks ass today, right now in real applications all over the world, and the next one is going t
by benreesman 18y ago
That hasn't been my experience at all. The JVM garbage collector kicks ass today, right now in real applications all over the world, and the next one is going to be even better. There is very likely a class of application out there where extreme micro-optimization is still a good tradeoff (Google's search maybe?), but anyone arguing that they really need to write it in C and do their own memory management carries the burden of proof these days, not the other way around.
In fact many would argue that for small, short-lived objects that the Sun GC outperforms malloc/free. This is a topic of debate, obviously.
- Dobbs 18y agoOperating systems, drivers and small embeded systems. I'm sure there are a few others. These also happen to be C's problem domain in the modern era.
- lacker 18y agoYeah, for Google most of the code that runs when you do a search is C++. (There's a lot of backend servers that handle different things so it isn't 100%, but the core search engine is definitely C++.) It's not just that it's extremely micro-optimized... the general issue is that when your code is running on enough machines it's more often a good tradeoff to spend programmer time to increase performance.
- benreesman 18y agoExactly. Spending programmer time to gain some marginal improvement in CPU cycle efficiency is almost always a bad call, except when that code is going to run on a GAJILLION CPUs all of which use a lot of electricity etc. I still think that this is only the case for a tiny fraction of all the code out there (Java is f*ing fast these days), and will become less and less true with each passing year.