Go Down

Topic: Exactly... How fast is Arduino? (Read 1 time) previous topic - next topic

arduino.poet

Quote
This may or may not be a valid thought, but doesn't using a for loop add overhead, so you're not getting an accurate result for how long it takes to do a multiple or add?


I get your point but in my program (the one described in the first post) all the operations happen inside for loops, so I guess that in this case it's important not to mitigate the loop overhead.

Thanks for all the replies  :)

mem

I doubt that worrying about the time spent in the for loop is the right place for your efforts to improve speed. I think you would get a far greater performance improvement if you can do the math using longs rather than floats. In many applications one can scale floats to longs with sufficient precision and if yours is one than you will considerably speed up your execution time. You can probably find a number of examples of how to do this on these and other AVR forums.

arduino.poet

Quote
I doubt that worrying about the time spent in the for loop is the right place for your efforts to improve speed.


Thanks for the hint; actually I don't want to improve (250 Hz should be enough) but I want to better understand how things are working.

Go Up