54 ms·
Basically it's 15 years behind Java in this regard this is fanboysm or just ignorance. It does not matter how sophisticated GC code is when you have millions o
by dschiptsov 13y ago
Basically it's 15 years behind Java in this regard this is fanboysm or just ignorance.
It does not matter how sophisticated GC code is when you have millions of tiny objects from from crappy Java code with useless copying and referencing. This is why it uses so much memory.
It is very difficult to find any worse thing that Java in terms of wasting of memory. Take any Hadoop none and measure the ratio between memory used by Java processes and amount of actual data stored in memory. Near factor of 2?
- coldtea 13y ago>It does not matter how sophisticated GC code is when you have millions of tiny objects from from crappy Java code with useless copying and referencing. This is why it uses so much memory. Or, you know, you can avoid writing "crappy" code. Whereas with Go's GC, even proper code will have problems. You are arguing something that is beyond discussion: Java's GC is better than Go's.
- dschiptsov 13y agoOr, you know, you can avoid writing "crappy" code. - In Java - hardly. It requires a discipline and skills beyond capacity of a typical developer. This phenomena could be called "memory is cheap and JVM will handle everything". Even in Clojure code, for example, they implement a node of a binary tree as a hash-table which is a meaningless waste. Position based selectors would be good enough. Java's GC is better than Go's - yes, in theory, on paper. In practice well-written Go code could outperform typical Java code, even with less sophisticated GC. Of course, I cannot prove that, but there are some intuitions to support such claims.