1 USING: help.markup help.syntax memory system ;
4 ARTICLE: "timing" "Timing code"
5 "You can time the execution of a quotation in the listener:"
7 "A lower-level word puts timings on the stack, intead of printing:"
8 { $subsections benchmark }
9 "You can also read the system clock and garbage collection statistics directly:"
14 { $see-also "profiling" } ;
19 { $values { "quot" "a quotation" }
20 { "runtime" "the runtime in microseconds" } }
21 { $description "Runs a quotation, measuring the total wall clock time." }
22 { $notes "A nicer word for interactive use is " { $link time } "." } ;
25 { $values { "quot" "a quotation" } }
26 { $description "Runs a quotation and then prints the total run time and some garbage collection statistics." } ;
28 { benchmark micros time } related-words