]> Cypherpunks repositories - gostls13.git/commit
math/big: replace goto with for loop
authorRichard Musiol <mail@richard-musiol.de>
Thu, 6 Feb 2014 22:44:30 +0000 (14:44 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 6 Feb 2014 22:44:30 +0000 (14:44 -0800)
commit547a82c36cbeb59544943848ec6c5cadbe0b770a
tree88f78aa5e8db13b6d78b868adcee998eb93b4e1e
parent2b6eb111e2c1f610a2acfa82dcbf4d43acc6dd8e
math/big: replace goto with for loop
I just added support for goto statements to my GopherJS project and now I am trying to get rid of my patches. These occurrences of goto however are a bit problematic:
GopherJS has to emulate gotos, so there is some performance drawback when doing so. In this case the drawback is major, since this is a core function of math/big which is called quite often. Additionally I can't see any reason here why the implementation with gotos should be preferred over my proposal.
That's why I would kindly ask to include this patch, even though it is functional equivalent to the existing code.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/55470046
src/pkg/math/big/arith.go