Time a function: Difference between revisions
Content added Content deleted
(Add Maple implementation) |
(Lingo added) |
||
Line 1,020: | Line 1,020: | ||
Done! |
Done! |
||
Counting to 1000000000 takes 3391ms |
Counting to 1000000000 takes 3391ms |
||
=={{header|Lasso}}== |
=={{header|Lasso}}== |
||
Line 1,028: | Line 1,027: | ||
} |
} |
||
'time for 100,000 loop repititions: '+(micros - #start)+' microseconds'</lang> |
'time for 100,000 loop repititions: '+(micros - #start)+' microseconds'</lang> |
||
=={{header|Lingo}}== |
|||
<lang lingo>on testFunc () |
|||
repeat with i = 1 to 1000000 |
|||
x = sqrt(log(i)) |
|||
end repeat |
|||
end</lang> |
|||
<lang lingo>ms = _system.milliseconds |
|||
testFunc() |
|||
ms = _system.milliseconds - ms |
|||
put "Execution time in ms:" && ms |
|||
-- "Execution time in ms: 983"</lang> |
|||
=={{header|Logo}}== |
=={{header|Logo}}== |