diff options
| author | Tyge Løvset <[email protected]> | 2021-06-02 23:03:25 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-06-02 23:03:25 +0200 |
| commit | 9907f43d30487efe5e7cb42c9a5e5a000ca44938 (patch) | |
| tree | c45b38c427e76a70ed3427d4399634948c65a26b /benchmarks | |
| parent | 82d96a5b79ac0ba3c28770c25f2157a500799f92 (diff) | |
| download | STC-modified-9907f43d30487efe5e7cb42c9a5e5a000ca44938.tar.gz STC-modified-9907f43d30487efe5e7cb42c9a5e5a000ca44938.zip | |
Updated benchmarks.
Diffstat (limited to 'benchmarks')
| -rw-r--r-- | benchmarks/pics/benchmark.gif | bin | 0 -> 160087 bytes | |||
| -rw-r--r-- | benchmarks/pics/benchmark.png | bin | 56364 -> 0 bytes | |||
| -rw-r--r-- | benchmarks/plot.py | 7 | ||||
| -rw-r--r-- | benchmarks/run_all.bat | 1 | ||||
| -rw-r--r-- | benchmarks/run_clang.sh | 21 | ||||
| -rw-r--r-- | benchmarks/run_gcc.sh | 21 | ||||
| -rw-r--r-- | benchmarks/run_vc.bat | 21 |
7 files changed, 38 insertions, 33 deletions
diff --git a/benchmarks/pics/benchmark.gif b/benchmarks/pics/benchmark.gif Binary files differnew file mode 100644 index 00000000..90f47fff --- /dev/null +++ b/benchmarks/pics/benchmark.gif diff --git a/benchmarks/pics/benchmark.png b/benchmarks/pics/benchmark.png Binary files differdeleted file mode 100644 index 1c9b18d7..00000000 --- a/benchmarks/pics/benchmark.png +++ /dev/null diff --git a/benchmarks/plot.py b/benchmarks/plot.py index 13962b52..bd386312 100644 --- a/benchmarks/plot.py +++ b/benchmarks/plot.py @@ -3,16 +3,19 @@ import pandas as pd import matplotlib.pyplot as plt
#sns.set_theme(style="whitegrid")
+comp = ['All compilers', 'Mingw-g++-10.30', 'Win-Clang-12', 'VC-19.28']
+n = 3
df = pd.read_csv('plot_perf.csv')
df = df[df.Method != 'total']
+if n > 0: df = df[df.Compiler == comp[n]]
g = sns.catplot(data=df, x='Method', y='Seconds', hue='Library', col='C', kind='bar',
- ci=68, legend=False, col_wrap=2, sharex=False, aspect=1.6, height=3)
+ ci=68, legend=False, col_wrap=2, sharex=False, aspect=1.4, height=3.1)
g.set_xlabels('')
g.add_legend(bbox_to_anchor=(0.75, 0.2), borderaxespad=0.)
g.fig.subplots_adjust(top=0.90, left=0.06, bottom=0.07)
-g.fig.suptitle('Benchmark STC vs c++ std containers', fontsize=15, y=0.98)
+g.fig.suptitle('Benchmark STC vs c++ std containers: %s' % comp[n], fontsize=15, y=0.98)
plt.show()
diff --git a/benchmarks/run_all.bat b/benchmarks/run_all.bat index 25f7af83..8f250871 100644 --- a/benchmarks/run_all.bat +++ b/benchmarks/run_all.bat @@ -2,5 +2,4 @@ set out=plot_perf.csv echo Compiler,Library,C,Method,Seconds,Ratio> %out% sh run_gcc.sh >> %out% sh run_clang.sh >> %out% -rem make sure cl.exe environment is available. call run_vc.bat >> %out% diff --git a/benchmarks/run_clang.sh b/benchmarks/run_clang.sh index 71a8981d..e8e9910f 100644 --- a/benchmarks/run_clang.sh +++ b/benchmarks/run_clang.sh @@ -1,11 +1,12 @@ -clang++ -I.. -O3 -o cdeq_benchmark.exe cdeq_benchmark.cpp -clang++ -I.. -O3 -o clist_benchmark.exe clist_benchmark.cpp -clang++ -I.. -O3 -o cmap_benchmark.exe cmap_benchmark.cpp -clang++ -I.. -O3 -o csmap_benchmark.exe csmap_benchmark.cpp -clang++ -I.. -O3 -o cvec_benchmark.exe cvec_benchmark.cpp +clang++ -I../include -O3 -o cdeq_benchmark.exe cdeq_benchmark.cpp +clang++ -I../include -O3 -o clist_benchmark.exe clist_benchmark.cpp +clang++ -I../include -O3 -o cmap_benchmark.exe cmap_benchmark.cpp +clang++ -I../include -O3 -o csmap_benchmark.exe csmap_benchmark.cpp +clang++ -I../include -O3 -o cvec_benchmark.exe cvec_benchmark.cpp -./cdeq_benchmark.exe Win-Clang-11 -./clist_benchmark.exe Win-Clang-11 -./cmap_benchmark.exe Win-Clang-11 -./csmap_benchmark.exe Win-Clang-11 -./cvec_benchmark.exe Win-Clang-11 +c=Win-Clang-12 +./cdeq_benchmark.exe $c +./clist_benchmark.exe $c +./cmap_benchmark.exe $c +./csmap_benchmark.exe $c +./cvec_benchmark.exe $c diff --git a/benchmarks/run_gcc.sh b/benchmarks/run_gcc.sh index 5c25b662..460afe16 100644 --- a/benchmarks/run_gcc.sh +++ b/benchmarks/run_gcc.sh @@ -1,11 +1,12 @@ -g++ -I.. -O3 -o cdeq_benchmark.exe cdeq_benchmark.cpp -g++ -I.. -O3 -o clist_benchmark.exe clist_benchmark.cpp -g++ -I.. -O3 -o cmap_benchmark.exe cmap_benchmark.cpp -g++ -I.. -O3 -o csmap_benchmark.exe csmap_benchmark.cpp -g++ -I.. -O3 -o cvec_benchmark.exe cvec_benchmark.cpp +g++ -I../include -O3 -o cdeq_benchmark.exe cdeq_benchmark.cpp +g++ -I../include -O3 -o clist_benchmark.exe clist_benchmark.cpp +g++ -I../include -O3 -o cmap_benchmark.exe cmap_benchmark.cpp +g++ -I../include -O3 -o csmap_benchmark.exe csmap_benchmark.cpp +g++ -I../include -O3 -o cvec_benchmark.exe cvec_benchmark.cpp -./cdeq_benchmark.exe Mingw-g++-9.20 -./clist_benchmark.exe Mingw-g++-9.20 -./cmap_benchmark.exe Mingw-g++-9.20 -./csmap_benchmark.exe Mingw-g++-9.20 -./cvec_benchmark.exe Mingw-g++-9.20
\ No newline at end of file +c=Mingw-g++-10.30 +./cdeq_benchmark.exe $c +./clist_benchmark.exe $c +./cmap_benchmark.exe $c +./csmap_benchmark.exe $c +./cvec_benchmark.exe $c
\ No newline at end of file diff --git a/benchmarks/run_vc.bat b/benchmarks/run_vc.bat index aee00cd7..3dca925b 100644 --- a/benchmarks/run_vc.bat +++ b/benchmarks/run_vc.bat @@ -1,14 +1,15 @@ @echo off if "%VSINSTALLDIR%"=="" call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" >nul -cl.exe -nologo -EHsc -std:c++latest -I.. -O2 cdeq_benchmark.cpp >nul -cl.exe -nologo -EHsc -std:c++latest -I.. -O2 clist_benchmark.cpp >nul -cl.exe -nologo -EHsc -std:c++latest -I.. -O2 cmap_benchmark.cpp >nul -cl.exe -nologo -EHsc -std:c++latest -I.. -O2 csmap_benchmark.cpp >nul -cl.exe -nologo -EHsc -std:c++latest -I.. -O2 cvec_benchmark.cpp >nul +cl.exe -nologo -EHsc -std:c++latest -I../include -O2 cdeq_benchmark.cpp >nul +cl.exe -nologo -EHsc -std:c++latest -I../include -O2 clist_benchmark.cpp >nul +cl.exe -nologo -EHsc -std:c++latest -I../include -O2 cmap_benchmark.cpp >nul +cl.exe -nologo -EHsc -std:c++latest -I../include -O2 csmap_benchmark.cpp >nul +cl.exe -nologo -EHsc -std:c++latest -I../include -O2 cvec_benchmark.cpp >nul del *.obj >nul -cdeq_benchmark.exe VC-19.28 -clist_benchmark.exe VC-19.28 -cmap_benchmark.exe VC-19.28 -csmap_benchmark.exe VC-19.28 -cvec_benchmark.exe VC-19.28
\ No newline at end of file +set c=VC-19.28 +cdeq_benchmark.exe %c% +clist_benchmark.exe %c% +cmap_benchmark.exe %c% +csmap_benchmark.exe %c% +cvec_benchmark.exe %c%
\ No newline at end of file |
