Problem 539. Fun Race
Solution Stats
Problem Comments
-
2 Comments
Very entertaining puzzle.
Hint to the frustrated, as I was:
This is a "noise" exclusion problem. The 1-sigma uncertainty in the time measurement is greater than the "true" time delta between foo and goo.
The test suite method is also vey well executed.
Regardless of noise, the function sign should not be faster than the gamma function. The function Gamma is a factorial/integral calculation, while the function Sign requires looking at just one bit. Unless there is a way to evaluate the gamma function looking at just one bit, sign should be faster. I am guessing that someone's computer has optimization issues.
PS: The other two cases make sense str2num should be slower since it is working with strings, and calling a function that uses a function B should be slower than just calling the function B.
Solution Comments
Show commentsProblem Recent Solvers34
Suggested Problems
-
Which values occur exactly three times?
4728 Solvers
-
3031 Solvers
-
Check to see if a Sudoku Puzzle is Solved
311 Solvers
-
Multiples of a Number in a Given Range
509 Solvers
-
331 Solvers
More from this Author100
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!