4 ms·
You should keep in mind that the memset call is almost guarenteed to be inlined. So your code actually looks like this: void dosomethingsensitive(void)
by DSMan195276 12y ago
You should keep in mind that the memset call is almost guarenteed to be inlined. So your code actually looks like this:
void
dosomethingsensitive(void)
{
uint8_t key[32];
/* ... */
int i;
for (i = 0; i < 32; i++)
key[i] = 0;
key[0] = key[1] + 1;
}
Assuming the optimizer is sufficiently smart, then it'll remove that 'for' and it'll remove the addition after it in the same fashion.