Skip to content

Commit f1e82d7

Browse files
committed
updated performance results
1 parent 958e7cf commit f1e82d7

File tree

3 files changed

+56
-52
lines changed

3 files changed

+56
-52
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ strings. The algorithm is implemented in dynamic prgramming manner. Complexity i
3434
## Performance results
3535
![Performance table](performance_table.png?raw=true "Performance table")
3636

37+
`(core)` means measurments of only algorithmic part of the programs (excluding
38+
startup, input-output operations)
39+
3740
## Folders overview
3841

3942
Each problem can be found in the folder with the same name. In each folder here
@@ -69,7 +72,7 @@ minutes to perform all compilations, generations and performance measures.
6972
The next command line is used to compile C++ program:
7073

7174
```
72-
g++ -std=c++11 -O2 -o main_cpp main.cpp
75+
g++ -std=c++11 -O2 -DNDEBUG -o main_cpp main.cpp
7376
```
7477

7578
The next command line is used to compile Rust program:

benchmark_results_raw.md

+52-51
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,89 @@
11
The test was launched by `run_bench.sh` script. The testing hardware is: Intel Core i7-4770, 16GB DDR3, SSD, Linux Mint 18.1 64-bit.
22
The output:
33
```
4-
Test 4_2_5
4+
Test huffman_encoding
55
66
Compiling programs..
77
Generate test data..
88
Measuring performance..
99
../common/compare_performance.sh
1010
Averaging performance of 10 runs..
11-
./main_cpp:
12-
test inp_low: .00168 sec
13-
test inp_mid: .02829 sec
14-
test inp_hi: .27003 sec
15-
16-
./main_rust:
17-
test inp_low: .00169 sec
18-
test inp_mid: .04197 sec
19-
test inp_hi: .43336 sec
11+
./main_cpp:
12+
test inp_low: runtime .00173 sec, core .00028 sec
13+
test inp_mid: runtime .02906 sec, core .02627 sec
14+
test inp_hi: runtime .26562 sec, core .25239 sec
15+
16+
./main_rust:
17+
test inp_low: runtime .00165 sec, core .00040 sec
18+
test inp_mid: runtime .03875 sec, core .03670 sec
19+
test inp_hi: runtime .41500 sec, core .40053 sec
20+
21+
Test huffman_decoding
2022
21-
Test 4_2_6
22-
23-
Compiling programs..
24-
Generate test data..
23+
Compiling programs..
24+
Generate test data..
2525
Measuring performance..
2626
../common/compare_performance.sh
2727
Averaging performance of 10 runs..
28-
./main_cpp:
29-
test inp_low: .00185 sec
30-
test inp_mid: .04698 sec
31-
test inp_hi: .43825 sec
32-
33-
./main_rust:
34-
test inp_low: .00152 sec
35-
test inp_mid: .02622 sec
36-
test inp_hi: .24990 sec
37-
38-
Test 6_1_4
39-
28+
./main_cpp:
29+
test inp_low: runtime .00165 sec, core .00019 sec
30+
test inp_mid: runtime .02519 sec, core .01828 sec
31+
test inp_hi: runtime .23616 sec, core .18015 sec
32+
33+
./main_rust:
34+
test inp_low: runtime .00153 sec, core .00023 sec
35+
test inp_mid: runtime .02639 sec, core .02162 sec
36+
test inp_hi: runtime .29077 sec, core .21806 sec
37+
38+
Test binary_search
39+
4040
Compiling programs..
41-
Generate test data..
41+
Generate test data..
4242
Measuring performance..
43-
../common/compare_performance.sh
44-
Averaging performance of 10 runs..
45-
./main_cpp:
46-
test inp_low: .00288 sec
47-
test inp_mid: .15820 sec
48-
test inp_hi: 1.85318 sec
49-
43+
../common/compare_performance.sh
44+
Averaging performance of 10 runs..
45+
./main_cpp:
46+
test inp_low: runtime .00236 sec, core .00007 sec
47+
test inp_mid: runtime .10366 sec, core .01847 sec
48+
test inp_hi: runtime 1.20806 sec, core .35945 sec
49+
5050
./main_rust:
51-
test inp_low: .00223 sec
52-
test inp_mid: .12787 sec
53-
test inp_hi: 1.55638 sec
51+
test inp_low: runtime .00179 sec, core .00008 sec
52+
test inp_mid: runtime .07810 sec, core .01910 sec
53+
test inp_hi: runtime 1.12885 sec, core .41750 sec
5454
55-
Test 6_4_5
55+
Test mergesort
5656
5757
Compiling programs..
5858
Generate test data..
5959
Measuring performance..
6060
../common/compare_performance.sh
6161
Averaging performance of 10 runs..
6262
./main_cpp:
63-
test inp_low: .00312 sec
64-
test inp_mid: .19478 sec
65-
test inp_hi: 2.10201 sec
63+
test inp_low: runtime .00310 sec, core .00093 sec
64+
test inp_mid: runtime .19630 sec, core .12184 sec
65+
test inp_hi: runtime 2.19702 sec, core 1.45821 sec
6666
6767
./main_rust:
68-
test inp_low: .00254 sec
69-
test inp_mid: .15996 sec
70-
test inp_hi: 1.83357 sec
68+
test inp_low: runtime .00248 sec, core .00092 sec
69+
test inp_mid: runtime .17509 sec, core .12201 sec
70+
test inp_hi: runtime 2.00531 sec, core 1.44780 sec
7171
72-
Test 8_3_8
72+
Test levenshtein
7373
7474
Compiling programs..
7575
Generate test data..
7676
Measuring performance..
7777
../common/compare_performance.sh
7878
Averaging performance of 10 runs..
7979
./main_cpp:
80-
test inp_low: .00405 sec
81-
test inp_mid: .01352 sec
82-
test inp_hi: .04957 sec
80+
test inp_low: runtime .00411 sec, core .00267 sec
81+
test inp_mid: runtime .01765 sec, core .01610 sec
82+
test inp_hi: runtime .07393 sec, core .07237 sec
8383
8484
./main_rust:
85-
test inp_low: .00410 sec
86-
test inp_mid: .01416 sec
87-
test inp_hi: .05289 sec
85+
test inp_low: runtime .00665 sec, core .00438 sec
86+
test inp_mid: runtime .02114 sec, core .01922 sec
87+
test inp_hi: runtime .08106 sec, core .07860 sec
88+
8889
```

performance_table.png

-44.2 KB
Loading

0 commit comments

Comments
 (0)