next | previous | forward | backward | up | top | index | toc | Macaulay2 web site

benchmark -- accurate timing of execution

Synopsis

Description

Produces an accurate timing for the code contained in the string s. The value returned is the number of seconds.
i1 : benchmark "sqrt 2p3000000"

o1 = 1.289517

o1 : RR (of precision 27)
The snippet of code provided will be run enough times to register meaningfully on the clock, and the garbage collector will be called beforehand.