mercredi 4 février 2015

optimize function's parameter in c (GCCarm)


Vote count:

0




i have limited RAM in my microController.(using arm gcc) i should write my code as efficient as possible. consider function blew :



int foo(uint32_t a , float b)
{
.....
return 0;
}


so i have two arguments a and b. now if i change the arguments to tow pointer to a and b is the the function takes less ram than the first function during execution :



int foo(uint32_t *a,float *b)
{
....
return 0;
}


what if the arguments become String or array ( of int , float ....)?? any references would be grate. thanks



asked 46 secs ago







optimize function's parameter in c (GCCarm)

Aucun commentaire:

Enregistrer un commentaire