3 ms·
Go has one GC benefit that a lot of other GC wielding languages do not; avoid using GC whenever sensible. Variables that are strictly local are almost always al
by tankenmate 10y ago
Go has one GC benefit that a lot of other GC wielding languages do not; avoid using GC whenever sensible. Variables that are strictly local are almost always allocated on the stack, so a function return has free built in GC; a sizeable number of allocated variables never hit the heap. Compare that to say CPython where everything is allocated on the heap.
- osd 10y agoThat's an unfair comparison. Python is notoriously bad with memory/speed in every flavor
- scriptkiddy 10y agoI have yet to understand why people are always trying to compare Go and Python. Python isn't made for the same use cases as Go is. Can Go do the work Python can? To an extent, yes. Can Python do the things Go can do? To an extent, yes. Python will always be slower with the CPython runtime. In short, I agree with you.
- tankenmate 10y agoIn the case of Google Go was developed in part to take over some of workloads previously done in Python; a language that is comparably as easy to develop in, with better tools and better performance. I suspect this is why the comparisons keep popping up.
- scriptkiddy 10y ago>In the case of Google Go was developed in part to take over some of workloads previously done in Python; a language that is comparably as easy to develop in, with better tools and better performance. Go definitely performs better, buy I think it'd disingenuous to claim that Go has better tooling.
- sfifs 10y agoJust by being a statically typed language, Go does have far better tooling and indeed many languages seem to copy its tooling concepts. What Python does have is a far richer third party library base.
- scriptkiddy 10y ago>What Python does have is a far richer third party library base. I assumed this is what you were talking about. i.e. Ipython, Jupyter, pdb, etc.
- sfifs 10y agonumpy pandas scikit-learn beautiful soup libraries for geo, geometry, tags, parsers etc etc. Python has an enormous base of sophisticated third party libraries.