Time a function: Difference between revisions
Content added Content deleted
(UNIX Shell) |
|||
Line 215: | Line 215: | ||
['2.7', '2.8', '31.4', '38.1', '58.0', '76.2', '100.5', '130.0', '149.3', '180.0'] |
['2.7', '2.8', '31.4', '38.1', '58.0', '76.2', '100.5', '130.0', '149.3', '180.0'] |
||
using ''qsort()'' from [[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). |
using ''qsort()'' from [[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|UNIX Shell}}== |
|||
$ time sleep 1 |
|||
real 0m1.074s |
|||
user 0m0.001s |
|||
sys 0m0.006s |