H
hello smith
I have a lot of functions that add values to an array. They alos update
a global variable of type int. Currently, I use a global variable to
hold this array. All functions access this array global variable and
add their values. Then they increment the global int variable.
Is it faster to pass the array and the int variable by reference to each
function or just access the global variables?
I have tried using gprof, I did not get anything that suggested either ways.
Thanks in advance for any help.
a global variable of type int. Currently, I use a global variable to
hold this array. All functions access this array global variable and
add their values. Then they increment the global int variable.
Is it faster to pass the array and the int variable by reference to each
function or just access the global variables?
I have tried using gprof, I did not get anything that suggested either ways.
Thanks in advance for any help.