4 ms·
Does anyone have any benchmarks on how fast this will run? For comparison C++ based implementations range from 13.5 seconds to 0.65 seconds when iterating over
by feniv 14y ago
Does anyone have any benchmarks on how fast this will run?
For comparison C++ based implementations range from 13.5 seconds to 0.65 seconds when iterating over 1,000,000,000 elements on an Intel Core i7 860, quad-core, hyperthreading, 2.8Ghz cpu. (http://create.stephan-brumme.com/eratosthenes/ http://create.stephan-brumme.com/eratosthenes/)
- Scaevolus 14y agoPretty 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-nuts/zRvkdfpeOY8 https://groups.google.com/forum/m/?fromgroups#!topic/golang-...
- StavrosK 14y agoDoes 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.
- icebraining 14y agoWell, there's lies, damn lies and benchmarks, but the Shootout has Go: http://shootout.alioth.debian.org/u64q/compare.php?lang=go http://shootout.alioth.debian.org/u64q/compare.php?lang=go (only the standard compiler, though. No gccgo)
- StavrosK 14y agoThat's very useful, thank you. I wish it had PyPy, though...
- igouy 14y ago"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 http://shootout.alioth.debian.org/more.php#languagex
- igouy 14y ago"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