I was trying todo a simple test to investigate something blocking/slowing in a program.
so I do this:
and get:
If i un-comment the memset line i get:
I believe that means my teensy is going faster with the extra line than without.
Can someone explain what I'm seeing.
Thanks.
so I do this:
Code:
uint32_t loopCount=0;
uint32_t currentTime=0;
const uint32_t speedCheckInterval=1000;
uint32_t speedCheckTime=speedCheckInterval;
char charBuffer[100] = {0};
void setup() {
}
void loop() {
loopCount++;
currentTime=millis();
if(currentTime>speedCheckTime)
{
Serial.print("loops/second: ");
Serial.println(loopCount);
speedCheckTime=currentTime+speedCheckInterval;
loopCount=0;
// memset(charBuffer, 0, sizeof(charBuffer));
}
}
Code:
loops/second: 469915
loops/second: 469920
loops/second: 469914
loops/second: 469919
loops/second: 469914
loops/second: 469919
loops/second: 469914
loops/second: 469917
loops/second: 469917
loops/second: 469917
loops/second: 469916
If i un-comment the memset line i get:
Code:
loops/second: 520964
loops/second: 520958
loops/second: 520963
loops/second: 520957
loops/second: 520962
loops/second: 520961
loops/second: 520963
loops/second: 520955
I believe that means my teensy is going faster with the extra line than without.
Can someone explain what I'm seeing.
Thanks.