Time a function: Difference between revisions
Content added Content deleted
(Added Easylang) |
m (→{{header|RPL}}: formatting + note) |
||
Line 2,610: | Line 2,610: | ||
#11CAh SYSEVAL tick - |
#11CAh SYSEVAL tick - |
||
B→R 8192 / 1 FIX RND STD |
B→R 8192 / 1 FIX RND STD |
||
≫ ≫ |
≫ ≫ '<span style="color:blue">TEVAL</span>' STO |
||
| |
| |
||
<span style="color:blue">TEVAL</span> ''( ≪function≫ -- execution_time )'' |
|||
Store current system time |
Store current system time |
||
Execute function |
Execute function |
||
Line 2,621: | Line 2,621: | ||
{{in}} |
{{in}} |
||
<pre> |
<pre> |
||
≪ 1 1000 START NEXT ≫ |
≪ 1 1000 START NEXT ≫ TEVAL |
||
</pre> |
</pre> |
||
{{out}} |
{{out}} |
||
Line 2,627: | Line 2,627: | ||
1: 6.4 |
1: 6.4 |
||
</pre> |
</pre> |
||
Yes, more than 6 seconds to loop 1000 times is quite slow. |
Yes, more than 6 seconds to loop 1000 times is quite slow. |
||
HP-49+ models have a built-in <code>TEVAL</code> command. |
|||
=={{header|Ruby}}== |
=={{header|Ruby}}== |