From: pito <pi...@vo...> - 2010-09-02 12:20:22
|
Hi, another example: \ : measure_doloop_empty timer-start 10000 0 do \ here put the stuff to measure loop timer-stop prnt_elapsed_ms ; \ fvariable tmp : measure_doloop_with_operation timer-start 10000 0 do _pi _ln2 f* tmp f! loop timer-stop prnt_elapsed_ms ; ------------------ Example: results in ms > measure_doloop_empty 47 ok > measure_doloop_with_operation 109274 ok > So the operation "tmp = pi * ln2" takes (109.274sec - 0.047sec)/10000 = 10.92ms per operation. Not fast, however. Pito |