Skip to main content
7 events
when toggle format what by license comment
Aug 23, 2016 at 12:34 comment added Mikael Patel Estimate the algorithms complexity and behavior. Read the generated assembly code and calculate the number of clock cycles. Write a test program and verify.
Aug 23, 2016 at 11:01 comment added William Roy Thank you very much. But how you know if this one or the other one is faster? How to determine it?
Aug 23, 2016 at 10:46 comment added Mikael Patel The above solution is slow. This is a fast hack to show that you do not need all the libraries mentioned in your original question. See @EdgarBonet's answer for a solution that runs much faster. It can be improved with table lookup to avoid division/modulo. That is what the Cosa version does.
Aug 23, 2016 at 10:28 comment added William Roy How would I check which answer/solution gives the faster result? I always print delta-micros() but is there a better way?
Aug 22, 2016 at 22:52 history edited Mikael Patel CC BY-SA 3.0
added 53 characters in body
Aug 22, 2016 at 22:27 history edited Mikael Patel CC BY-SA 3.0
added 331 characters in body
Aug 22, 2016 at 22:15 history answered Mikael Patel CC BY-SA 3.0