/ go Public
cmd/compile: loops prevent bounds checking elimination #40704
Issues related to the Go compiler and/or runtime.
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
What version of Go are you using (
Does this issue reproduce with the latest release?
What did you do?
If I do some copies between arrays with a loop like:
it bounds check on each array on every iteration.
but if I unroll it, it can figure out that it will never go out of bounds and eliminate the checks:
This means that when implementing performance critical code (ie cryptography) I find myself unrolling loops of 8-16 because they end up on pprof which really sucks for readability
The text was updated successfully, but these errors were encountered: