@ 2017-03-10T13:11:43Z <?php
$nbOcc = 10000000; //10 millions
$aToSort = ['W7', 'Y9', 'K6', 'E1', 'T8', 'L5', 'X3', 'F1', 'P7', 'K1', 'R2', 'Y0', 'D7', 'N0', 'V5', 'L9', 'H3', 'O9', 'F8', 'E2', 'R5', 'T5', 'B1', 'J7', 'X8', 'M2', 'X8', 'N2', 'N7', 'B0', 'F5', 'J4', 'E7', 'O8', 'F5', 'C9', 'A6', 'E6', 'D8', 'B5', 'T0', 'H9', 'M3', 'E4', 'B4', 'Y6', 'G5', 'Y8', 'Z0', 'F3', 'A0', 'I8', 'K0', 'S2', 'L6', 'Y8', 'S0', 'B9', 'E9', 'H5', 'M8', 'E8', 'H8', 'Y3', 'E2', 'F6', 'H8', 'O9', 'M2', 'T9', 'D2', 'I1', 'Z0', 'L7', 'K4', 'U6', 'K6', 'P3', 'K8', 'Y3', 'M5', 'C6', 'Y2', 'J0', 'L7', 'H3', 'I0', 'G9', 'V5', 'E0', 'Q9', 'H0', 'W2', 'G2', 'K1', 'L8', 'M8', 'K0', 'S5', 'J3', 'B7', 'O3', 'Q0', 'Z0', 'G8', 'C5', 'C5', 'Z8', 'I9', 'N2', 'K2', 'R1', 'F4', 'O9', 'H8', 'D4', 'U3', 'S3', 'C5', 'J6', 'A3', 'V4', 'L2', 'O6', 'D3', 'I2', 'O2', 'C8', 'Y5', 'C9', 'W3', 'F2', 'R8', 'X9', 'E4', 'Z8', 'A4', 'B5', 'F5', 'L4', 'S1', 'O7', 'Z9', 'D5', 'Y6', 'U3', 'K5', 'R1', 'C0', 'G6', 'C5', 'Z8', 'B8', 'X0', 'A1', 'X9', 'W4', 'U9', 'Y9', 'I9', 'P0', 'S1', 'D3', 'P6', 'L7', 'G9', 'T6', 'P9', 'G1', 'Q6', 'L3', 'X3', 'L4', 'F6', 'U9', 'C2', 'L1', 'V1', 'U5', 'R3', 'J0', 'J7', 'B7', 'E9', 'T1', 'K7', 'U7', 'L8', 'E0', 'P2', 'Y6', 'C6', 'A2', 'O1', 'S4', 'V2', 'N4', 'V8', 'V0', 'Y4', 'K4', 'V3', 'Z3', 'H1', 'M7', 'O3', 'Z9', 'L1', 'Q8', 'A2', 'S5', 'U6', 'M5', 'C0', 'V4', 'T9', 'F6', 'D7', 'J9', 'K4', 'A0', 'Y3', 'E4', 'V6', 'B4', 'H1', 'W6', 'L9', 'W0', 'W2', 'W7', 'W3', 'L3', 'V1', 'Q1', 'F0', 'D1', 'C4', 'O4', 'I3', 'E6', 'W8', 'B2', 'O8', 'R3', 'C9', 'S6', 'V3', 'I8', 'V7', 'N9', 'L9', 'N1', 'I6', 'J7', 'M2', 'T8', 'Y4', 'Q1', 'P9', 'V8', 'W4', 'J7', 'Z3', 'K7', 'F0', 'M8', 'R0', 'P4', 'Z3', 'Y8', 'T1', 'W1', 'U0', 'E9', 'G0', 'X9', 'P4', 'V2', 'A4', 'E9', 'E6', 'H0', 'U8', 'L9', 'C6', 'R3', 'W3', 'K1', 'J9', 'E2', 'Q5', 'W8', 'G8', 'G6', 'F8', 'A1', 'J1', 'V3', 'B8', 'F8', 'T4', 'I2', 'J7', 'X1', 'U9', 'L4', 'L1', 'J9', 'S6', 'O4', 'Y0', 'P1', 'E0', 'P8', 'W9', 'P0', 'J2', 'T4', 'Y7', 'C2', 'L2', 'V2', 'U6', 'X8', 'W8', 'W2', 'W2', 'A4', 'G4', 'W5', 'M6', 'X6', 'U5', 'Y1', 'F9', 'D9', 'K2', 'R9', 'X2', 'O6', 'C0', 'S1', 'D6', 'X2', 'Q9', 'K9', 'H4', 'D8', 'M9', 'C0', 'A0', 'N9', 'H6', 'F2', 'K5', 'E8', 'I4', 'U3', 'Z0', 'F6', 'V1', 'Q6', 'B1', 'W7', 'H4', 'S8', 'R9', 'G6', 'W3', 'E8', 'S9', 'A0', 'F0', 'W6', 'Y6', 'E3', 'P7', 'Q9', 'K6', 'C5', 'X0', 'L1', 'R3', 'R8', 'M6', 'S1', 'L6', 'S1', 'Z9', 'A0', 'S8', 'I3', 'R8', 'O2', 'V0', 'B7', 'Q8', 'Y3', 'J8', 'D9', 'T3', 'F5', 'K9', 'U7', 'F0', 'R4', 'G6', 'G8', 'X1', 'D8', 'W5', 'F5', 'W1', 'A4', 'Y8', 'X1', 'R6', 'U0', 'H3', 'P1', 'E7', 'E3', 'P9', 'J5', 'O9', 'H3', 'T0', 'L1', 'G7', 'T6', 'J8', 'C9', 'Z9', 'D4', 'V5', 'V6', 'I6', 'I1', 'J3', 'M9', 'U7', 'Q3', 'P9', 'X3', 'V5', 'Z9', 'A9', 'Z2', 'P0', 'A5', 'P3', 'U4', 'K5', 'Y1', 'S3', 'O9', 'R2', 'O6', 'I2', 'R1', 'B6', 'A3', 'H5', 'T3', 'D7', 'T2', 'S0', 'D9', 'X7', 'S9', 'M5', 'L2', 'W3', 'N9', 'S9', 'I6', 'U6', 'J4', 'C5', 'D6', 'P1', 'E4', 'Y0', 'V5', 'J1', 'O4', 'Y2', 'H1', 'I8', 'F6', 'S5', 'Q8', 'U6', 'P1', 'H9', 'T5', 'I6', 'F5', 'R6', 'Y3', 'F9', 'L8', 'B3', 'K5', 'G7', 'T7', 'R7', 'M9', 'Y0', 'O3', 'P7', 'R4', 'A7', 'P8', 'K9', 'R2', 'W7', 'Q0', 'U9', 'I7', 'C4', 'V6', 'W6', 'K9', 'O6', 'M0', 'K8', 'U6', 'G2', 'Q9', 'G9', 'I5', 'P6', 'M3', 'P8', 'W0', 'I9', 'V6', 'Z6', 'D5', 'N3', 'I1', 'J4', 'D0', 'S0', 'E0', 'E8', 'D4', 'I5', 'N1', 'V3', 'X0', 'B2', 'R9', 'P7', 'V7', 'X8', 'L4', 'U9', 'B5', 'C7', 'Y8', 'U6', 'R3', 'A9', 'V9', 'F7', 'K4', 'F7', 'F2', 'Q3', 'E8', 'I3', 'F6', 'B3', 'Y4', 'J9', 'B9', 'N6', 'R6', 'C2', 'N5', 'J6', 'L1', 'P1', 'Y2', 'V7', 'X4', 'H2', 'A8', 'M7', 'K8', 'M0', 'Y5', 'O0', 'G2', 'I3', 'X8', 'W3', 'C8', 'S6', 'F1', 'A7', 'J6', 'E4', 'H1', 'X3', 'A3', 'N4', 'D7', 'A9', 'B4', 'I4', 'Q5', 'M7', 'A7', 'O8', 'J0', 'R9', 'M7', 'D4', 'W4', 'S6', 'Q4', 'S3', 'X6', 'I3', 'S4', 'L9', 'T5', 'G4', 'X6', 'S5', 'O9', 'O7', 'P2', 'Z1', 'T0', 'D8', 'C4', 'W5', 'P4', 'F3', 'U4', 'T8', 'H6', 'I0', 'W4', 'D7', 'T3', 'T8', 'E7', 'S9', 'G9', 'W9', 'U1', 'M7', 'V5', 'U8', 'N1', 'D0', 'V7', 'M0', 'N0', 'E1', 'H5', 'G3', 'N6', 'D1', 'G3', 'U3', 'W5', 'C0', 'K8', 'Z9', 'V3', 'D0', 'J9', 'J0', 'Z4', 'W6', 'I2', 'H0', 'B9', 'T4', 'Q0', 'F8', 'M4', 'G8', 'O4', 'Z2', 'N7', 'O7', 'M9', 'H0', 'R0', 'I9', 'H3', 'B5', 'M9', 'G2', 'A1', 'L7', 'R5', 'P3', 'H6', 'S5', 'E4', 'D3', 'T5', 'U4', 'A9', 'H7', 'I0', 'Q8', 'U6', 'F5', 'Q9', 'M7', 'H7', 'C5', 'J8', 'F7', 'R2', 'T2', 'S8', 'O3', 'I7', 'K4', 'P8', 'Z8', 'Y1', 'O7', 'J3', 'Q7', 'T5', 'K6', 'Y8', 'N1', 'L9', 'B0', 'J0', 'W1', 'O3', 'B3', 'E1', 'S3', 'B5', 'Y7', 'C5', 'A4', 'C3', 'V2', 'R6', 'L4', 'A3', 'X3', 'O0', 'Y0', 'V8', 'H1', 'Y5', 'X9', 'O0', 'D0', 'D3', 'A5', 'O1', 'G8', 'P7', 'J2', 'D7', 'D5', 'O6', 'P3', 'M1', 'T5', 'O2', 'L3', 'Q0', 'X5', 'B0', 'Z7', 'Q5', 'P0', 'P6', 'D5', 'Q7', 'M7', 'T6', 'P8', 'T9', 'U7', 'C1', 'N0', 'R1', 'W3', 'F5', 'S1', 'D1', 'R3', 'F6', 'X9', 'D1', 'O7', 'G3', 'Y4', 'I5', 'W6', 'S8', 'M7', 'S7', 'I9', 'P5', 'B6', 'M6', 'F7', 'B7', 'V0', 'P4', 'B5', 'P5', 'V8', 'E1', 'H4', 'B0', 'P8', 'W4', 'E1', 'I0', 'B3', 'H9', 'L7', 'O7', 'X8', 'X5', 'U6', 'Q1', 'H5', 'H6', 'O6', 'C6', 'C5', 'G5', 'T7', 'L3', 'H9', 'V6', 'U1', 'G7', 'R6', 'J7', 'U0', 'W8', 'Q8', 'H9', 'Z8', 'B7', 'R2', 'U3', 'Y9', 'Q6', 'R3', 'P9', 'M7', 'D6', 'C5', 'X5', 'Q3', 'J0', 'V4', 'M6', 'U9', 'Y3', 'J9', 'C2', 'C0', 'B1', 'K6', 'O8', 'R2', 'T6', 'F0', 'D0', 'W0', 'X1', 'V3', 'A6', 'H5', 'Z5', 'W4', 'R0', 'Z3', 'M2', 'Z9', 'N8', 'Y4', 'R2', 'C7', 'V8', 'F1', 'K3', 'Z3', 'C8', 'Q3', 'I9', 'L7', 'S2', 'A7', 'R2', 'H6', 'F8', 'Z4', 'W5', 'C4', 'U0', 'L5', 'L8', 'N0', 'V2', 'Q6', 'C1', 'G6', 'J3', 'P9', 'N4', 'W0', 'C3', 'W8', 'R2', 'A8', 'P4', 'R5', 'O1', 'G4', 'W0', 'F7', 'F8', 'L5', 'M5', 'Q7', 'T0', 'J9', 'M8', 'X2', 'Z9', 'I9', 'H0', 'Q9', 'O1', 'H9', 'A6', 'B8', 'U2', 'R6', 'H9', 'M5', 'X4', 'Y2', 'F2', 'Q7', 'W1', 'T3', 'B1', 'G7', 'U8', 'E4', 'E2', 'M3', 'U3', 'V2', 'B2', 'Z9', 'D9', 'G7', 'V8', 'Z9', 'L3', 'H6', 'M8', 'R4', 'S3', 'U8', 'R3', 'W1', 'H8', 'Z4', 'N8', 'Q1', 'F6', 'I9', 'F2', 'Y1', 'U0', 'C1', 'B4', 'K3', 'F4', 'C6'];
$i=0;
$start = microtime(true);
for ($i=0; $i<$nbOcc; ++$i) {
natsort($aToSort);
}
$end = microtime(true);
echo 'Usage of 10.000.000 of natsort: ' . ($end-$start) . ' seconds.';
$start = microtime(true);
for ($i=0; $i<$nbOcc; ++$i) {
sort($aToSort, SORT_NATURAL);
}
$end = microtime(true);
echo 'Usage of 10.000.000 of sort with flag SORT_NATURAL: ' . ($end-$start) . ' seconds.';
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Abusive script This script was stopped while abusing our resources
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 8.0.0 0.014 1.973 16.71 7.4.13 0.023 1.979 16.45 7.4.12 0.011 1.990 16.34 7.4.11 0.010 1.980 16.50 7.4.10 0.019 1.961 16.52 7.4.9 0.007 1.993 16.58 7.4.8 0.011 1.995 16.41 7.4.7 0.008 1.991 16.45 7.4.6 0.024 1.962 16.47 7.4.5 0.008 1.992 16.46 7.4.4 0.015 1.987 16.57 7.4.3 0.008 1.994 16.37 7.4.2 0.005 1.995 16.41 7.4.1 0.010 1.989 16.62 7.4.0 0.028 1.979 16.33 7.3.25 0.019 1.965 16.46 7.3.24 0.024 1.968 16.38 7.3.23 0.014 1.983 16.51 7.3.22 0.011 1.983 16.45 7.3.21 0.010 1.992 16.40 7.3.20 0.007 1.993 16.59 7.3.19 0.010 1.987 16.43 7.3.18 0.011 1.989 16.64 7.3.17 0.008 1.995 16.49 7.3.16 0.021 1.970 16.40 7.3.15 0.016 1.986 16.45 7.3.14 0.003 2.005 16.47 7.3.13 0.010 1.990 16.53 7.3.12 0.023 1.972 16.49 7.3.11 0.036 1.951 16.33 7.3.10 0.016 1.984 16.36 7.3.9 0.021 1.974 16.60 7.3.8 0.011 1.978 16.45 7.3.7 0.033 1.676 16.30 7.3.6 0.016 1.820 16.35 7.3.5 0.010 1.982 16.36 7.3.4 0.011 1.982 16.46 7.3.3 0.034 1.851 16.46 7.3.2 0.022 1.961 16.39 7.3.1 0.013 1.984 16.46 7.3.0 0.019 1.976 16.50 7.2.34 0.027 1.949 16.72 7.2.33 0.020 1.975 16.60 7.2.32 0.008 1.993 16.68 7.2.31 0.020 1.984 16.59 7.2.30 0.015 1.991 16.56 7.2.29 0.020 1.984 16.66 7.2.28 0.021 1.972 16.78 7.2.27 0.016 1.987 16.65 7.2.26 0.020 1.982 16.71 7.2.25 0.030 1.953 16.80 7.2.24 0.043 1.956 16.67 7.2.23 0.059 1.928 16.63 7.2.22 0.033 1.968 16.45 7.2.21 0.022 1.778 16.74 7.2.20 0.025 1.787 16.51 7.2.19 0.024 1.963 16.60 7.2.18 0.024 1.976 16.33 7.2.17 0.030 1.973 16.42 7.2.16 0.020 1.970 16.41 7.2.15 0.023 1.969 16.54 7.2.14 0.013 1.997 16.61 7.2.13 0.044 1.957 16.42 7.2.12 0.031 1.965 16.53 7.2.11 0.028 1.969 16.39 7.2.10 0.016 1.985 16.23 7.2.9 0.018 1.989 16.57 7.2.8 0.023 1.979 16.34 7.2.7 0.026 1.806 16.49 7.2.6 0.024 1.779 16.39 7.2.5 0.015 1.991 16.58 7.2.4 0.025 1.977 16.73 7.2.3 0.008 1.985 16.79 7.2.2 0.010 1.990 16.80 7.2.1 0.010 1.990 16.71 7.2.0 0.016 1.977 16.61 7.1.33 0.079 1.922 15.75 7.1.32 0.032 1.936 15.65 7.1.31 0.023 1.750 15.75 7.1.30 0.021 1.979 15.45 7.1.29 0.011 1.982 15.48 7.1.28 0.028 1.962 15.62 7.1.27 0.028 1.964 15.50 7.1.26 0.016 1.981 15.58 7.1.25 0.023 1.974 15.52 7.1.24 0.024 1.968 15.54 7.1.23 0.021 1.972 15.62 7.1.22 0.020 1.986 15.55 7.1.21 0.041 1.958 15.56 7.1.20 0.023 1.978 15.54 7.1.19 0.026 1.765 15.53 7.1.18 0.014 1.908 15.40 7.1.17 0.013 1.990 15.39 7.1.16 0.015 1.983 15.62 7.1.15 0.013 1.995 15.64 7.1.14 0.026 1.971 15.63 7.1.13 0.030 1.979 15.67 7.1.12 0.010 1.996 15.66 7.1.11 0.003 1.995 15.80 7.1.10 0.007 1.993 15.54 7.1.9 0.013 1.986 15.73 7.1.8 0.003 1.989 15.66 7.1.7 0.016 1.983 15.65 7.1.2 0.033 2.393 40.23 7.1.1 0.143 1.643 22.17 7.1.0 0.020 1.147 22.39 7.0.33 0.020 1.974 15.13 7.0.32 0.018 1.985 15.12 7.0.31 0.024 1.945 15.11 7.0.30 0.016 1.977 15.28 7.0.29 0.008 1.994 15.42 7.0.28 0.008 1.979 15.42 7.0.27 0.016 1.981 15.35 7.0.26 0.007 1.996 15.68 7.0.25 0.007 1.994 15.42 7.0.24 0.006 1.993 15.48 7.0.23 0.016 1.985 15.43 7.0.22 0.006 1.992 15.44 7.0.21 0.019 1.983 15.39 7.0.16 0.010 2.450 21.98 7.0.15 0.077 1.723 20.29 7.0.14 0.033 1.647 21.99 7.0.13 0.020 1.303 20.33 7.0.12 0.013 1.367 21.84 7.0.11 0.023 2.193 21.85 7.0.10 0.017 2.343 21.90 7.0.9 0.023 2.390 22.03 7.0.8 0.013 2.443 21.89 7.0.7 0.000 2.457 21.98 7.0.6 0.020 2.020 21.98 7.0.5 0.163 1.650 20.35 7.0.4 0.007 1.403 21.84 7.0.3 0.010 1.507 20.25 7.0.2 0.007 1.780 21.85 7.0.1 0.153 1.540 20.33 7.0.0 0.170 1.347 20.27 5.6.40 0.016 1.989 16.20 5.6.39 0.020 1.979 16.01 5.6.38 0.023 1.983 15.74 5.6.37 0.028 1.889 16.13 5.6.36 0.028 1.981 16.26 5.6.35 0.013 1.923 15.91 5.6.34 0.018 1.905 16.19 5.6.33 0.010 1.987 16.42 5.6.32 0.007 1.990 15.99 5.6.31 0.016 1.982 15.86
preferences:dark mode live preview
45.31 ms | 403 KiB | 5 Q