42 ms·
According to the Shootout, Go-1.1 is only slower on a few tests than Java, while being a bit faster on most and while typically using way less memory.
by dscrd 14y ago
According to the Shootout, Go-1.1 is only slower on a few tests than Java, while being a bit faster on most and while typically using way less memory.
- voidlogic 14y agoWin some, lose some: http://benchmarksgame.alioth.debian.org/u64/benchmark.php?test=all&lang=go&lang2=java http://benchmarksgame.alioth.debian.org/u64/benchmark.php?te... Note: The much faster version Go's DNA regex that uses PCRE rather than "regexp", but it is currently broken due to a build error. (http://benchmarksgame.alioth.debian.org/u64/program.php?test=regexdna&lang=go&id=7 http://benchmarksgame.alioth.debian.org/u64/program.php?test...)
- igouy 14y agoLet's also note that the Go regex-dna programs run out of memory on x86 :-(
- trailfox 14y agoThe quad core results indicate the exact opposite in terms of performance with the JVM clearly ahead: http://benchmarksgame.alioth.debian.org/u32q/benchmark.php?test=all&lang=go&lang2=java http://benchmarksgame.alioth.debian.org/u32q/benchmark.php?t... Go uses less memory than Java 7, but then again so does Java 1.1
- carbocation 14y agoReading some of the go programs, they do not appear to be configured to take advantage of more than one core.
- igouy 14y agoPlease -- no generalities -- provide a URL so we can all see what you are looking at, and reach our own understanding.
- carbocation 14y agoOK, here's the first program on the list provided by trailfox: http://benchmarksgame.alioth.debian.org/u32q/program.php?test=fastaredux&lang=go&id=2 http://benchmarksgame.alioth.debian.org/u32q/program.php?tes... Note that: 1) It only ever uses one core, because 2) It isn't configured with GOMAXPROCS, which therefore defaults to 1. So, sure, they have an N-core machine, but they're only allowing go to access 1 core.
- igouy 14y ago>>but they're only allowing<< Notice on the list provided by `trailfox` the "≈ CPU Load" column -- when the programs are written to use 4 cores "they're" allowing Go to access 4 cores.
- carbocation 14y agoNo. Go programs currently require a one-line instruction to tell them how many cores to use. Without that one line, they will only use one core. The go program in question was written without that instruction; therefore, it's only allowed to use one core.
- igouy 14y ago>only allowed to use one core< Only "allowed" by who? If you mean that "the Go program in question" is by-design a sequential program then -- yes of course it is! The contributed Go programs that were written for multi-core use more than one core -- http://benchmarksgame.alioth.debian.org/u32q/program.php?test=fannkuchredux&lang=go&id=1 http://benchmarksgame.alioth.debian.org/u32q/program.php?tes...
- Roboprog 14y agoWhat, you don't need a mandlebrot set in your CRUD app?