I have a std::set which is of type point
struct point
{
int x;
int y;
int z;
};
Suppose I want to perform three different operation on each variable in set i.e
At this point, should i use three predefined alogrithmic functions in sequence or should I write my own alogrithm which would perform all three operations by iterating over the set the once?
Even if you get a ten-fold speed increase, if that piece of code only uses 5% of your application's time, you've just decreased the execution time to 95%. So, unless you know this is a real bottleneck in your application, don't waste time trying to optimize it. And the only way to know this is through profiling.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With