4 ms·
Wait, are you saying that C is 50 times faster than Go? I find that very hard to believe. I could buy 3-4 times faster, especially if the C code is vectorized a
by gautamcgoel 6y ago
Wait, are you saying that C is 50 times faster than Go? I find that very hard to believe. I could buy 3-4 times faster, especially if the C code is vectorized and the Go code is not, but 50-100x seems unrealistic IMO. Do you have any benchmarks to back up your claim?
- johndough 6y agohttps://ideone.com/T56tDZ https://ideone.com/T56tDZ I get close to 5 GB/s with this online IDE and twice that on my 6 year old laptop, which is roughly a factor of 20 to 40 faster than 250 MB/s. A factor of 100 sounds plausible with more modern RAM or larger cache size.
- gautamcgoel 6y agoYou only benchmarked the C code. In order to get an apples to apples comparison, you have to benchmark the Go code on the same hardware - your comment compares the runtimes of two different implementations on different hardware.
- formerly_proven 6y ago> Wait, are you saying that C is 50 times faster than Go? Are you saying you need 50 clock cycles to compare two integers?
- gautamcgoel 6y ago...no? What made you think that?
- richieartoul 6y agoIts hard to believe because its dead wrong. See my benchmark above.
- gautamcgoel 6y agoYeah what OP wrote is complete nonsense. Sad that this stuff bubbles to the front of HN and then gets quoted endlessly...