View Single Post
  #27   Spotlight this post!  
Unread 05-08-2010, 08:54
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Is the crio powerful enough?

Quote:
Originally Posted by kamocat View Post
I don't suppose there's any reason to perform it with changing input values, is there? Computers take just as long to multiply 0x0 as they do 57x291, correct?
Actually, that isn't always true. For example, the Cortex-M3 multiply timing follows:
32 bits x 32 bits = 32 bits is always one cycle
32b x 32b = 64b takes 3 cycles if the result is small
32b x 32b = 64b takes 5 cycles if the result is big

Also, it is relatively common for functions to bail early for special values, such as 0. For example, my sine function bails in less than half of the usual execution time if the input is a multiple of 45 degrees.

Quote:
Originally Posted by kamocat View Post

Just in case, I used a random-number generator. (This prevents LabVIEW from compiling the results as constants in the program)


It took about 0.000492ms per iteration of the sine function, measured over a million iterations. To put it on the same scale as Ether's measurement, that's 0.5 microseconds.
Thanks!