Time a function: Difference between revisions

m
(add RPL)
Line 2,334:
 
=={{header|RPL}}==
In its first versions, RPL did not provide user access to system clock - but advacancedadvanced users knowknew which system call can be made on their machine to get it. The following code works on a 1987-manufactured HP-28S, but can crash on older ones and will surely do on on other machines.
{{works with|Halcyon Calc|4.2.7}}
{| class="wikitable"
! RPL code
Line 2,364 ⟶ 2,363:
</pre>
Yes, more than 6 seconds to loop 1000 times is quite slow.
 
=={{header|Ruby}}==
Ruby's Benchmark module provides a way to generate nice reports (numbers are in seconds):
1,151

edits