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

For fun, I tried this in go on M1 Mac (basically because benchmarking in go is so easy)

And... the two codes runs with exactly the same speed, on M1 Mac, with go.

edit: of course, with go, you can manually parallelize the faster option with goroutines... but that does something else, doesn't it. (and it's 500x faster.)



Does the Go compiler auto-vectorise? Vectorisation appears to have been the cause of the weird performance.


No, I don't think so.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: