• Richard Musiol's avatar
    math/big: replace goto with for loop · 547a82c3
    Richard Musiol authored
    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
    547a82c3
arith.go 4.21 KB