WLJS LogoWLJS Notebook

RepeatedTiming

RepeatedTiming[expr] evaluates expr repeatedly and returns a list of the average time in seconds used, together with the result obtained.

RepeatedTiming[expr, t] does repeated evaluation for at least t seconds.

Examples

RepeatedTiming[Sum[i, {i, 10000}]]
(* {0.00012, 50005000} *)
RepeatedTiming[Prime[10000], 1]
(* {2.3*10^-6, 104729} *)

Please visit the official Wolfram Language Reference for more details.

On this page