in reply to Very basic question on performance
If this code is really being executed millions of times per second, such that whatever slight increment in speed that might be obtained from “bogosity” and/or “golf” has business ROI to actually counter the increase in maintenance and enhancement costs, then you might be able to make a case (to your boss!) for doing this. But why not spend $30,000 on faster blade servers, and more of them? “Throw sand in its face.” “Throw silicon at it.” You often come out way ahead.
(Speaking philosophically and impersonally now ...) “The trouble with computer programmers is, not only do they fail to realize just how expensive they are (beyond their salary and benefits!), but they also fail to realize what makes them so expensive.” What would make this code expensive? One of your successors, after you got hired-away by Google, specifying @_[2], instead of @_[3], in just one friggin’ place that happens to be on the lee-side of an if/then/else ... in April, in the code-path that won’t be used until the last week in December, when end-of-year close outs (due on January 1st following) are done. The mistake isn’t obvious, because the code isn’t obvious. Of course there isn’t a regression-testing suite, or of course it wasn’t run. So, the error isn’t caught, the reporting is done ... and the numbers are public, duly filed with government regulators ... and they are wrong, and guess who tells us that? “All for the want of a millisecond?” No, thanks! After all, I can always $$buy$$ time.
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Very basic question on performance
by Preceptor (Deacon) on Mar 15, 2014 at 12:08 UTC |