4 ms·
What I find lacking in a lot of these discussions, beyond the cursory "unless you need super performance" is the context of what the code is for, and what the u
by kevinalexbrown 14y ago
What I find lacking in a lot of these discussions, beyond the cursory "unless you need super performance" is the context of what the code is for, and what the users expect.
For instance, in the scientific computation that I do, most code will be used in finished form on the order of 10s of datasets at most. Occasionally, we step out from R or Matlab or Python and use C/C++ if a) we know we'll use a function thousands of times in multiple contexts, b) we're writing code to be used by other people, or c) we're working in a time/resource constrained environment, like a supercomputer or shared cluster with many users, where we pay for time.
I imagine the "modest" 2x improvement would not matter at all if: a) your users are going to batch process a bunch of files just a couple times, but want the most up-to-date features possible, so you optimize for production speed, not performance, or b) you are writing the code for yourself, so letting it run in the background or on a cluster for 2 days instead of 1 doesn't make a huge difference.
On the other hand, if I were writing a photo-editing program where users call the same feature over and over and over to get the photo looking just right, I would definitely prioritize performance, and a 2x improvement is a very noticeable speedup over a competitor's. A lot of products I use every day are actually like this.