Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » debugging » benchmark
next | previous | forward | backward | up | index | toc

benchmark -- accurate timing of execution

Description

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

o1 = .0003034394312165487

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

For the programmer

The object benchmark is a function closure.


The source of this document is in Macaulay2Doc/ov_debugging.m2:537:0.