5 ms·
I've thought of doing something more general (see my while loops), and I've looked for other bits of source code that use a general approach, but haven't found
by 16s 16y ago
I've thought of doing something more general (see my while loops), and I've looked for other bits of source code that use a general approach, but haven't found any in C++. Maybe I've just over-looked it
You're right, most people hard code the for loops they need. I call that the "intuitive approach". It works and it makes sense I think and performs OK. In fact, whenever I come up with new ways to do CPs I always compare their performance to the hard coded loops.