Time a function: Difference between revisions

m
→‎Example: More specific link to another task
(→‎{{header|Go}}: add testing.Benchmark example)
m (→‎Example: More specific link to another task)
Line 1,385:
>>> print [usec(qsort, (range(n),)) for n in range(10)]
[2.7, 2.8, 31.4, 38.1, 58.0, 76.2, 100.5, 130.0, 149.3, 180.0]
using ''qsort()'' from [[Quicksort#Python|Quicksort]]. Timings show that the implementation of ''qsort()'' has quadratic dependence on sequence length ''N'' for already sorted sequences (instead of ''O(N*log(N))'' in average).
 
=={{header|R}}==