|
|
|
|
|
by lossolo
2618 days ago
|
|
Probably because Go version is different, compare C vector operations with Go vector operations. C version is operating on pointer without allocating new vector, Go version is allocation new vector on every op. EDIT: Look at C code assembly, it's generating mostly SIMD instructions and using xmm registers. That's why it's faster. Golang compiler still do not have autovectorization implemented that's why it's so much slower in this case. EDIT2: It seems Go version also uses SSE here, which is nice. So probably unnecessary allocation from my original post was the reason. |
|