Goto Leads to Faster Code
pdoubleya writes "There's an article over at the NY Times (registration required) about Kazushige Goto, the author of the Goto Basic Linear Algebra Subroutines (BLAS, see the wiki); his BLAS implementation is used by 4 of the current 11 fastest computers in the world. Goto is known for painstaking effort in hand-optimizing his routines; in one case, "when computer scientists at the University at Buffalo added Goto BLAS to their Pentium-based supercomputer, the calculating power of the system jumped from 1.5 trillion to 2 trillion mathematical operations per second out of a theoretical limit of 3 trillion." To quote Jack Dongarra, from the University of Tennessee, "I tell them that if they want the fastest they should still turn to Mr. Goto."" Ever get the feeling someone wrote an article merely for the pun?
If used properly, GOTOs can still leave the code readable and maintainable. Besides.... We've all been using GOTO's under different names. In C++, what do you think the 'case' statement or the 'break' statement is? It's essentially a GOTO. Still readable. Still maintainable. Bad programmers will leave code unreadable and unmaintainable regardless of whether or not they use GOTOs. Good programmers can use GOTOs with no problems.
"Don't use goto" is sort of and absolute/godly moral. It's good for those that can't think and decide for themselves. People that can think and decide for themselves know that there are no absoltue morals and occasionally decide to use a goto, when it's appropriate for their use.
While I can understand why structrured programming was introduced, I still think it is sort of funny to use like a dozen syntactical constructions, that all can have their own quirks, for flow control, while all those things are done with one machine code on a proper RISC machine, meaning the jump instruction.
Just because I can imagine doing a hippopotamus, doesn't mean I'd like to do it.
I'd be interested in exactly what the circumstances for introducing gotos speeding up code are.
From the article, "Recently there has been a quiet controversy around the Goto BLAS because Mr. Goto has been slow to offer his work as open-source software, the free model of software distribution.
Some programmers have suggested that Mr. Goto has not joined the open-source movement because he wants to protect his secrets and strategies from competitors."
Why does it matter? For a talent as unique as his, and as competitive as it is (according to the article), why is it so wrong to keep it proprietary and actually, uck, profit from his work? Why should there be a contraversy? Here's a thought, the zealots should go immitate him like they do every other commercial venture if its so important to them.
Anyway, from the article, he says that its not so and there will be an open source release at some point in the future. In anycase, the open source world isn't entitled anything and its shame that they should stirr up tension just because their savory jaws are dripping.
Good grief.
Thanks, Leabre