Hacker News new | past | comments | ask | show | jobs | submit login

Similarly, you can turn off bounds-checking in Go like this:

  go build -gcflags=-B
and see if it helps. Generally the assembly looks better, but it doesn't really run faster on a modern chip.

Do your own test, and keep the results in mind next time somebody on Hacker News dismisses Go because of the "overwhelming cost of bounds checking".




> next time somebody on Hacker News dismisses Go because of the "overwhelming cost of bounds checking".

That’s certainly one criticism I don’t remember ever seeing.


There's a few examples like this https://news.ycombinator.com/item?id=32256038 if you search comments for "go bounds checking"


It appears that the flag keeps being undocumented, though.

https://pkg.go.dev/cmd/compile




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

Search: