4 ms·
I have a hard time believing anything can beat or even match the garbage collection performance of the JVM. Not that there is something special about the JVM, j
by pkulak 14y ago
I have a hard time believing anything can beat or even match the garbage collection performance of the JVM. Not that there is something special about the JVM, just that there have been _so_ many smart people working on the problem for so long now. And for good performance doing server tasks (ie, not computational tasks) exceptional GC is a must. Can a GO program handle a workload that creates tens/hundreds of thousands of objects per second for weeks or months without leaking memory? That's why I use Java. If I don't need that kind of performance, I use Ruby. I'm still just not sure where GO would fit into my workflow, though it looks really promising. Especially the concurrency model that you currently have to awkwardly bolt on to Java with something like Akka or JetLang.
- fusiongyro 14y agoI have to raise the eyebrow to that. I have had more GC problems with Java than any other language. Geniuses fuck up too, and when they do it's pronounced "OutOfMemoryError: PermGen space."
- pjmlp 14y agoThat error is specific for Sun/Oracle's JVM.
- codygman 14y agoRemember Go doesn't have objects, it only has structs which are most likely (and should be, but I haven't verified) much lighter weight than the objects you might be used to in Java. As far as the creating tens/hundreds of thousands of structs per second for weeks or months without leaking memory, I'll get back to you on that once my code has been active that long ;)
- pkulak 14y agoIf you have something really intensive running GO, I genuinely would love to hear how it's going after some uptime. Thank you.
- jlouis 14y agoUsually the in-memory representation is the same for objects and structs, given a garbage collected language.
- codygman 14y agoOk, I'll have to test it sometime. (if anyone has tested it, let me know)
- Evbn 14y agoGo has optional stack allocation, which means the GC doesn't need to handle short lived objects.