J
Joakim Hove
Hello,
i have a quite large and unwieldy function with *many* local
variables. The various variables are typically only used in small
parts of the function, and I would like to define them locally:
double function () {
double gvar1,gvar2;
{
double var1,var2;
/* Code doing something with var1 and var2 */
}
/* Code accessing the function-global variables gvar1 and gvar2 */
{
double var3,var4;
/* Code working on var3 and var4 */
}
}
The code path is deterministic, and all blocks will be executed. Now,
my question is wether there is a hit in execution speed by doing it
like this?
Regards
Joakim
i have a quite large and unwieldy function with *many* local
variables. The various variables are typically only used in small
parts of the function, and I would like to define them locally:
double function () {
double gvar1,gvar2;
{
double var1,var2;
/* Code doing something with var1 and var2 */
}
/* Code accessing the function-global variables gvar1 and gvar2 */
{
double var3,var4;
/* Code working on var3 and var4 */
}
}
The code path is deterministic, and all blocks will be executed. Now,
my question is wether there is a hit in execution speed by doing it
like this?
Regards
Joakim