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 { $subsection benchmark }
9 "You can also read the system clock and garbage collection statistics directly:"
10 { $subsection millis }
11 { $subsection gc-stats }
12 { $see-also "profiling" } ;
17 { $values { "quot" "a quotation" }
18 { "runtime" "an integer denoting milliseconds" } }
19 { $description "Runs a quotation, measuring the total wall clock time." }
20 { $notes "A nicer word for interactive use is " { $link time } "." } ;
23 { $values { "quot" "a quotation" } }
24 { $description "Runs a quotation and then prints the total run time and some garbage collection statistics." } ;
26 { benchmark millis time } related-words