Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Pretty slow. This is intended to demonstrate how Go concurrency works, so there's a lot of communication overhead.

Someone ported djb's primegen (uses the Sieve of Atkin) to Go, and got comparable performance-- .7s for primes up to a trillion. https://groups.google.com/forum/m/?fromgroups#!topic/golang-...



Does anyone know which ballpark Go is in, performance-wise? In my mind, it's a bit faster than Python, whereas I would expect it to be closer to C. However, I have no clue how I formed this opinion, so actual benchmarks would help.

I wonder how it compares to pypy.


Well, there's lies, damn lies and benchmarks, but the Shootout has Go: http://shootout.alioth.debian.org/u64q/compare.php?lang=go (only the standard compiler, though. No gccgo)


"After all, facts are facts, and although we may quote one to another with a chuckle the words of the Wise Statesman, 'Lies--damned lies--and statistics,' still there are some easy figures the simplest must understand, and the astutest cannot wriggle out of." Leonard Henry Courtney, 1895


That's very useful, thank you. I wish it had PyPy, though...


"If you're interested in something not shown then please take the program source code and the measurement scripts and publish your own measurements."

http://shootout.alioth.debian.org/more.php#languagex




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: