-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
29 lines (25 loc) · 854 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
/**
* These is something I did in my spare time to remember the sorting alhorithms out there
* The default PHP sort (that uses quicksort behind the scenes) is much faster than anything
* you can write in pure PHP. Even with optimizations and opcode cache (which I didn't do / take
* into consideration), these scrips are orders of magnitude slower than PHP sort() - which is used
* in PhpDefaultSort class.
*/
include "includes/autoload.php";
include "includes/app.php";
include "includes/UnitTester.php";
$algorithms = array(
'MergeSort',
'ShellSort',
'InsertionSort',
'GnomeSort',
'BubbleSort',
'PhpDefaultSort'
);
UnitTester::runUnitTests('MergeSort');
$algorithmTester = new AlgorithmTester($algorithms, 100, 2);
$algorithmTester->run();
echo '<br>';
echo '========================';
echo '<br>Script ended';