next | previous | forward | backward | up | top | index | toc | home

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 "2^500"

o1 = 2.57968*10^-6

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