I have an array of numbers, for example: 1,2,3,4,5...,10
For every item the following function is called:
do
{
if (..)
{
return_val= performsomething (parm1,parm2..parm5);
}
}
The function performsomething()
is written like below:
performsomething (x1,x2,...)
{
if (A_req?)
{
performA();
}
else if (B_req?)
{
performB();
}
}
Now, if it is seen closely, for every item the function performsomething()
is getting called.
I want to avoid the performance overhead of these many function calls. I want to refactor the method performsomething()
like it will check the conditions A_req?
or B_req?
. Accordingly, it will call performA()
or performB()
. I want to make performsomething()
as 'inline' and call the underlying functions as needed.
Please help me how to code efficiently to achieve the above requirement .!.
Please help me how to code efficiently to achieve the above requirement .!.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-discussion+unsubscribe@isocpp.org.
To post to this group, send email to std-dis...@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-discussion/.