Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- one_of_my_functions()
- {
- while(some cond)
- {
- myfunc.execute(params_array);
- //myfunc is already initialized and has a member variable which stores information about the function which has to be executed
- //myfunc has code which does a check to first find what type of func (plugin_func, external_func, etc.) it is after which it does a few more checks to see how many arguments it accepts
- //then it checks if any parameters are bind-ed
- //after all that the function is called
- }
- }
- //the issue is
- //the same checks are going to be repeated for over 10000 iterations which is a waste of CPU
- //I can get rid of repeating checks by moving them outside the loop
- //but that would be a bad idea because
- //1. myfunc.execute code is used in over 100 functions
- //2. it would bloat the one_of_my_functions code
Add Comment
Please, Sign In to add comment