Skip to content

Commit

Permalink
Datos para los primeros 4 algoritmos
Browse files Browse the repository at this point in the history
  • Loading branch information
sanrodari committed Jan 13, 2015
1 parent 7d275e3 commit 63a0526
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/scripts/lib/fileLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
<div id="byte_range"></div>
<div id="byte_content"></div>

<script src="insertion-sort.js"></script>
<script src="heapinsert-sort.js"></script>
<script src="merge-sort.js"></script>
<script src="merge-sort-optimized.js"></script>
<script src="heap-sort.js"></script>
<script src="quick-sort.js"></script>
<script src="quick-sort-mejorado.js"></script>
<script src="counting-sort.js"></script>

<script>
function readBlob(opt_startByte, opt_stopByte) {

Expand All @@ -36,7 +45,6 @@
// If we use onloadend, we need to check the readyState.
reader.onloadend = function(evt) {
if (evt.target.readyState == FileReader.DONE) { // DONE == 2
document.getElementById('byte_content').textContent = evt.target.result;
document.getElementById('byte_range').textContent =
['Read bytes: ', start + 1, ' - ', stop + 1,
' of ', file.size, ' byte file'].join('');
Expand Down
96 changes: 96 additions & 0 deletions ejecucion-analisis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
1. Ejecución de insertion sort, n^2

100001, 7879.19200000033
200001, 31442.00499999988
300001, 70422.42899999928
400001, 125349.29600000032
500001, 198020.58399999986
600001, 288094.59100000095
700001, 392694.1700000007
800001, 503449.0330000008
900001, 643835.395, 179.6 MB
1000001, 772551.7820000005, 133.2 MB

2. Ejecución de heapinsert sort, n^2

100001, 3475.390999999945, 37.2 MB
200001, 13908.935000001293, 62.3 MB
300001, 31357.928999999785, 94.4 MB
400001, 55322.16400000107, 97.1 MB
500001, 87874.89900000219, 105.3 MB
600001, 132253.4459999988, 111.4 MB
700001, 181094.19700000217, 94.5 MB
800001, 236604.10799999954, 172.9 MB
900001, 299023.1989999993, 135.5 MB
1000001, 367165.6950000033, 146.0 MB

3. Merge Sort O(n log(n))

100001, 71.31000000299537, 77.2 MB
200001, 130.81099999908474, 96.1
300001, 224.91100000115694, 90.1
400001, 273.90799999921, 119.4
500001, 360.6290000025183, 148.7
600001, 464.6739999989222, 228.3
700001, 652.195999999094, 218.8
800001, 812.9719999997178, 309.6
900001, 958.9090000008582, 300.2
1000001, 1107.9270000009274, 300.5
2000001, 2871.85700000191, 403.1
3000001, 4839.922999999544, 453.3
4000001, 6441.98900000265, 545.5
5000001, 8621.863999997004, 829.2
6000001, 10371.351000001596, 921.2
7000001, 12644.34700000129, 777.8
8000001, 14588.198999997985, 1.02 GB
9000001, 16908.54600000239, 1.04 GB
10000001, 18865.52600000141, 1.05 GB
11000001, 21870.2340000018, 1.08 GB
12000001, 23284.598000002006, 1.07
13000001, 25551.785000003292, 1.03
14000001, 28455.172999998467, 1.15
15000001, 30696.702999997797, 1.11 GB
16000001, 33538.150000000314, 1.23 GB
17000001, 37216.606000001775, 1.04 GB
18000001, 38932.40999999762, 1.26 GB
19000001, 41970.74099999736, 1.34 GB
20000001, 44777.656000002025, 1.40

4. Merge Sort optimizado en uso de memoria O(n log(n))

100001, 70.71100000030128,
200001, 114.20500000167522, 66.2
300001, 144.99200000136625, 87.3
400001, 197.50399999975343, 114.2
500001, 257.03299999804585, 175.3
600001, 325.16100000066217, 167
700001, 415.97399999955087, 254
800001, 476.53600000194274, 256
900001, 555.780999999115, 340
1000001, 601.4140000006591, 287
2000001, 1532.9799999999523, 403.8
3000001, 2580.628000003344, 488.3
4000001, 3559.360999999626, 559.8
5000001, 4705.479000000196, 604.3
6000001, 6162.5980000026175, 642.9
7000001, 7185.727000000043, 708.3
8000001, 8367.957999998907, 784.6
9000001, 9983.969000000798, 795.2
10000001, 11487.788999998884, 932.6
11000001, 13017.361000001983, 1023.8
12000001, 14661.908000001858, 1.08 GB
13000001, 16685.30699999974, 1.11 GB
14000001, 18307.239000001573, 1.10 GB
15000001, 20734.07899999802, 1.13 GB
16000001, 22792.605000002368, 1.14
17000001, 24163.845999999467, 1.19
18000001, 26295.901999998023, 1.19
19000001, 29440.136000001075, 1.62
20000001, 31034.833999998227, 1.93

5. Heap Sort O(n log(n))

....

result = sorting.byHeap(testArray); ''
console.log(result.n + ", " + result.time);

0 comments on commit 63a0526

Please sign in to comment.