diff options
| author | Tyge Løvset <[email protected]> | 2023-07-24 08:48:41 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-07-24 08:48:41 +0200 |
| commit | 374b3c27831cd4e09461867ed231669777b96951 (patch) | |
| tree | 88011006f6d536cdb1ad1eca8073392ca80687cc /misc/benchmarks | |
| parent | 177418232a2d8a8b0df1667d3e4bd15dc37db59f (diff) | |
| parent | 650b053f443f9132dadb6d1ca924c0b36849739f (diff) | |
| download | STC-modified-374b3c27831cd4e09461867ed231669777b96951.tar.gz STC-modified-374b3c27831cd4e09461867ed231669777b96951.zip | |
Merge pull request #65 from stclib/dev43
Dev43
Diffstat (limited to 'misc/benchmarks')
| -rw-r--r-- | misc/benchmarks/plotbench/cvec_benchmark.cpp | 6 | ||||
| -rw-r--r-- | misc/benchmarks/plotbench/plot.py | 2 | ||||
| -rw-r--r-- | misc/benchmarks/plotbench/run_all.bat | 2 | ||||
| -rw-r--r-- | misc/benchmarks/plotbench/run_clang.sh | 2 | ||||
| -rw-r--r-- | misc/benchmarks/plotbench/run_gcc.sh | 2 | ||||
| -rw-r--r-- | misc/benchmarks/plotbench/run_vc.bat | 4 | ||||
| -rw-r--r-- | misc/benchmarks/various/csort_bench.c | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/misc/benchmarks/plotbench/cvec_benchmark.cpp b/misc/benchmarks/plotbench/cvec_benchmark.cpp index 3b4c3d7d..45b9cf93 100644 --- a/misc/benchmarks/plotbench/cvec_benchmark.cpp +++ b/misc/benchmarks/plotbench/cvec_benchmark.cpp @@ -71,18 +71,18 @@ Sample test_stc_vector() { s.test[INSERT].t1 = clock(); container con = cvec_x_init(); csrand(seed); - c_forrange (N) cvec_x_push_back(&con, crand() & mask1); + c_forrange (N) cvec_x_push(&con, crand() & mask1); s.test[INSERT].t2 = clock(); s.test[INSERT].sum = cvec_x_size(&con); s.test[ERASE].t1 = clock(); - c_forrange (N) { cvec_x_pop_back(&con); } + c_forrange (N) { cvec_x_pop(&con); } s.test[ERASE].t2 = clock(); s.test[ERASE].sum = cvec_x_size(&con); cvec_x_drop(&con); }{ csrand(seed); container con = cvec_x_init(); - c_forrange (N) cvec_x_push_back(&con, crand() & mask2); + c_forrange (N) cvec_x_push(&con, crand() & mask2); s.test[FIND].t1 = clock(); size_t sum = 0; //cvec_x_iter it, end = cvec_x_end(&con); diff --git a/misc/benchmarks/plotbench/plot.py b/misc/benchmarks/plotbench/plot.py index e65631b7..8e684ccc 100644 --- a/misc/benchmarks/plotbench/plot.py +++ b/misc/benchmarks/plotbench/plot.py @@ -4,7 +4,7 @@ import pandas as pd import matplotlib.pyplot as plt #sns.set_theme(style="whitegrid") -comp = ['All compilers', 'Mingw-g++-11.3.0', 'Win-Clang-14.0.1', 'VC-19.28'] +comp = ['All compilers', 'Mingw-g++-13.1.0', 'Win-Clang-16.0.5', 'VC-19.36'] n = int(sys.argv[1]) if len(sys.argv) > 1 else 0 file = sys.argv[2] if len(sys.argv) > 2 else 'plot_win.csv' df = pd.read_csv(file) diff --git a/misc/benchmarks/plotbench/run_all.bat b/misc/benchmarks/plotbench/run_all.bat index 98913a50..23a62eed 100644 --- a/misc/benchmarks/plotbench/run_all.bat +++ b/misc/benchmarks/plotbench/run_all.bat @@ -4,4 +4,4 @@ echo gcc sh run_gcc.sh >> %out% echo clang sh run_clang.sh >> %out% -REM call run_vc.bat >> %out% +call run_vc.bat >> %out% diff --git a/misc/benchmarks/plotbench/run_clang.sh b/misc/benchmarks/plotbench/run_clang.sh index 59d577d9..fc3e90ec 100644 --- a/misc/benchmarks/plotbench/run_clang.sh +++ b/misc/benchmarks/plotbench/run_clang.sh @@ -6,7 +6,7 @@ clang++ -DNDEBUG -I../../include -O3 -o cmap_benchmark$exe cmap_benchmark.cpp clang++ -DNDEBUG -I../../include -O3 -o csmap_benchmark$exe csmap_benchmark.cpp clang++ -DNDEBUG -I../../include -O3 -o cvec_benchmark$exe cvec_benchmark.cpp -c='Win-Clang-14.0.1' +c='Win-Clang-16.0.5' ./cdeq_benchmark$exe $c ./clist_benchmark$exe $c ./cmap_benchmark$exe $c diff --git a/misc/benchmarks/plotbench/run_gcc.sh b/misc/benchmarks/plotbench/run_gcc.sh index 73b979d3..0bd2d6ee 100644 --- a/misc/benchmarks/plotbench/run_gcc.sh +++ b/misc/benchmarks/plotbench/run_gcc.sh @@ -4,7 +4,7 @@ g++ -DNDEBUG -I../../include -O3 -o cmap_benchmark cmap_benchmark.cpp g++ -DNDEBUG -I../../include -O3 -o csmap_benchmark csmap_benchmark.cpp g++ -DNDEBUG -I../../include -O3 -o cvec_benchmark cvec_benchmark.cpp -c='Mingw-g++-11.3.0' +c='Mingw-g++-13.1.0' ./cdeq_benchmark $c ./clist_benchmark $c ./cmap_benchmark $c diff --git a/misc/benchmarks/plotbench/run_vc.bat b/misc/benchmarks/plotbench/run_vc.bat index dc4938f8..a162fb64 100644 --- a/misc/benchmarks/plotbench/run_vc.bat +++ b/misc/benchmarks/plotbench/run_vc.bat @@ -6,9 +6,9 @@ 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 +if exist *obj del *.obj -set c=VC-19.28 +set c=VC-19.36 cdeq_benchmark.exe %c% clist_benchmark.exe %c% cmap_benchmark.exe %c% diff --git a/misc/benchmarks/various/csort_bench.c b/misc/benchmarks/various/csort_bench.c index f6b7f1db..793a0503 100644 --- a/misc/benchmarks/various/csort_bench.c +++ b/misc/benchmarks/various/csort_bench.c @@ -48,7 +48,7 @@ int main(int argc, char *argv[]) { Ints a = Ints_with_capacity(size); for (i = 0; i < size; i++) - *Ints_push(&a, romutrio(s) & (1U << 30) - 1); + Ints_push(&a, romutrio(s) & (1U << 30) - 1); testsort(&a, size, "random"); for (i = 0; i < 20; i++) printf(" %d", (int)*Ints_at(&a, i)); |
