Re:Ruby `reject!`
by greenyoda on Tuesday February 21, 2017 @03:28AM
(#13694198)
Many years ago, I got a bug report about a feature in an ex-coworker's code. The complaint was that the program would hang when you added the tenth item in a GUI. It turned out that it didn't really hang, but took a half hour to execute because the algorithm was inadvertently exponential. Further examination of the code revealed that the result of the exponential calculation wasn't even being used. So I didn't have to figure out how to make the algorithm linear - I just removed the useless code.
[ Parent
| on HN ]
There are no comments on this comment yet.