What Go has become for me: Python with performance

December 2, 2013

I recently wrote a program in Go and in the process I realized what Go has become to me. To put it in a nutshell I think of Go as Python with performance. Specifically, my natural inclination is to write test programs and other utilities in Python because I find that the easiest and fastest way to work. Most of the time this is fine but every so often I write something where I care about the performance and want something relatively close to 'as fast as the computer can possibly deliver' (and certainly much closer than what Python can deliver). When that happened recently, I turned to Go.

Go is (for me) relatively close to Python in terms of ease and speed of writing small things but it compiles to something that I can be relatively confident that is running pretty fast (and probably without random object allocation and garbage collection overhead). Go has irritations and I'm not yet as fluid with it as I could be (partly because I've only written a few Go programs so far), but it beats the heck out of trying to write quick code in C. C is good for some things for me, but 'quick tests' is not one of them.

I'd like to write something more substantial in Go so I can explore it in more depth, but so far I lack some combination of time, energy, and a suitable project. But I suspect that I'd like it for larger things given that there is an ever-increasing number of people writing glowing articles about how writing something in Go was a real help.

(At this point it'd actually be more interesting to read articles about where Go failed or didn't help a project.)

I'm aware that my use for Go isn't at all unusual and in fact is part of a general trend. The Go people themselves have written about it (including some reasons on why). Consider this yet another data point if you want.


Comments on this page:

What about using python with pypy?

By cks at 2013-12-06 11:43:05:

I think that pypy would have a number of practical problems for me. The big one I see is uncertain performance improvements (between pypy itself and vastly different versions of pypy in different packaging systems). Unless I became an expert in pypy there would be no way to know ahead of time that pypy would get my Python program fast enough, and if my Python program isn't fast enough it was a waste of time to write it at all.

(For things like performance testing programs there would also be an uncertainty about where the slowness was. Was my test slow because of a real limit in whatever I was testing, or because PyPy couldn't get my Python fast enough? Something like Go is much more predictable here.)

Written on 02 December 2013.
« Why 'hotplug' approaches to device handling are the right way
The three faces of sudo »

Page tools: View Source, View Normal, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Mon Dec 2 00:51:28 2013
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.