diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 9a29fb50..dfdd234e 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -198,6 +198,10 @@ jobs: git submodule update --init ./bootstrap.sh ./b2 -d0 headers + - name: Install Boost.Unordered branch feature/unordered_node_map + run: | + cd $GITHUB_WORKSPACE + git clone -b feature/unordered_node_map https://github.com/boostorg/unordered.git boost_unordered-root - name: Install Abseil run: | cd $GITHUB_WORKSPACE @@ -206,7 +210,7 @@ jobs: run: | cd $GITHUB_WORKSPACE ${{matrix.compiler}} --version - ${{matrix.compiler}} ${{matrix.sourcefile}} ${{matrix.architecture}} ${{matrix.compileroptions}} -o ${{matrix.outputfile}} -I$GITHUB_WORKSPACE/boost-root -I$GITHUB_WORKSPACE/abseil-root + ${{matrix.compiler}} ${{matrix.sourcefile}} ${{matrix.architecture}} ${{matrix.compileroptions}} -o ${{matrix.outputfile}} -I$GITHUB_WORKSPACE/boost_unordered-root/include -I$GITHUB_WORKSPACE/boost-root -I$GITHUB_WORKSPACE/abseil-root - name: Set reportfile name run: | echo "REPORT_FILE=${{matrix.reportdir}}/${{matrix.sourcefile}}.csv" >> $GITHUB_ENV @@ -309,6 +313,11 @@ jobs: git submodule update --init cmd /c bootstrap.bat .\b2.exe -d0 headers + - name: Install Boost.Unordered branch feature/unordered_node_map + shell: cmd + run: | + cd %GITHUB_WORKSPACE% + git clone -b feature/unordered_node_map https://github.com/boostorg/unordered.git boost_unordered-root - name: Install Abseil shell: cmd run: | @@ -320,7 +329,7 @@ jobs: cd %GITHUB_WORKSPACE% # call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{matrix.architecture}} call "C:\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" ${{matrix.architecture}} - set INCLUDE=%INCLUDE%;%GITHUB_WORKSPACE%\boost-root;%GITHUB_WORKSPACE%\abseil-root + set INCLUDE=%INCLUDE%;%GITHUB_WORKSPACE%\boost_unordered-root\include;%GITHUB_WORKSPACE%\boost-root;%GITHUB_WORKSPACE%\abseil-root echo %INCLUDE% ${{matrix.compiler}} ${{matrix.sourcefile}} ${{matrix.compileroptions}} - name: Set reportfile name diff --git a/insert_data.py b/insert_data.py index ac56c155..a909f3c0 100644 --- a/insert_data.py +++ b/insert_data.py @@ -1,6 +1,6 @@ # Feeds csv data into Excel file for graph generation # -# Copyright 2022 Joaquin M Lopez Munoz. +# Copyright 2022-2023 Joaquin M Lopez Munoz. # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) @@ -41,8 +41,9 @@ with io.open(args.input_file,"r",encoding=args.encoding) as filein: ws.cell(row=row,column=2).value=None ws.cell(row=row,column=3).value=None ws.cell(row=row,column=4).value=None + ws.cell(row=row,column=5).value=None - pattern=re.compile(r"([0-9]+);([0-9.]+);([0-9.]+);([0-9.]+)") + pattern=re.compile(r"([0-9]+);([0-9.]+);([0-9.]+);([0-9.]+);([0-9.]+)") for row,line in enumerate(lines[lines_read:],2): m=pattern.match(line) if not m: break @@ -50,5 +51,6 @@ with io.open(args.input_file,"r",encoding=args.encoding) as filein: ws.cell(row=row,column=2).value=float(m.group(2)) ws.cell(row=row,column=3).value=float(m.group(3)) ws.cell(row=row,column=4).value=float(m.group(4)) + ws.cell(row=row,column=5).value=float(m.group(5)) wb.save(args.excel_file) diff --git a/running_erasure.cpp b/running_erasure.cpp index 80d2172d..ab253af8 100644 --- a/running_erasure.cpp +++ b/running_erasure.cpp @@ -1,7 +1,7 @@ /* Measuring running erasure times of unordered associative containers * without duplicate elements. * - * Copyright 2013-2022 Joaquin M Lopez Munoz. + * Copyright 2013-2023 Joaquin M Lopez Munoz. * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) @@ -115,16 +115,17 @@ boost::reference_wrapper temp_cref(T&& x) template< template class Tester, - typename Container1,typename Container2,typename Container3> + typename Container1,typename Container2, + typename Container3,typename Container4> void test( const char* title, - const char* name1,const char* name2,const char* name3) + const char* name1,const char* name2,const char* name3,const char* name4) { unsigned int n0=10000,n1=10000000,dn=500; double fdn=1.05; std::cout<(), temp_cref(create(n)))); + std::cout<<";"<<(t/m)*10E6; + + t=measure(boost::bind( + Tester(), + temp_cref(create(n)))); std::cout<<";"<<(t/m)*10E6< #include +#include int main() { using container_t1=absl::flat_hash_map; - using container_t2=boost::unordered_flat_map; - using container_t3=boost::unordered_map; + using container_t2=boost::unordered_map; + using container_t3=boost::unordered_flat_map; + using container_t4=boost::unordered_node_map; test< running_erasure, container_t1, container_t2, - container_t3> + container_t3, + container_t4> ( "Running erasure", "absl::flat_hash_map", + "boost::unordered_map", "boost::unordered_flat_map", - "boost::unordered_map" + "boost::unordered_node_map" ); } diff --git a/running_insertion.cpp b/running_insertion.cpp index 47227a47..91ea516c 100644 --- a/running_insertion.cpp +++ b/running_insertion.cpp @@ -1,7 +1,7 @@ /* Measuring running insertion times of unordered associative containers * without duplicate elements. * - * Copyright 2013-2022 Joaquin M Lopez Munoz. + * Copyright 2013-2023 Joaquin M Lopez Munoz. * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) @@ -120,10 +120,11 @@ struct norehash_running_insertion template< template class Tester, - typename Container1,typename Container2,typename Container3> + typename Container1,typename Container2, + typename Container3,typename Container4> void test( const char* title, - const char* name1,const char* name2,const char* name3) + const char* name1,const char* name2,const char* name3,const char* name4) { unsigned int n0=10000,n1=10000000,dn=500; double fdn=1.05; @@ -131,7 +132,7 @@ void test( initialize_data(n1); std::cout<(),n)); + std::cout<<";"<<(t/m)*10E6; + + t=measure(boost::bind(Tester(),n)); std::cout<<";"<<(t/m)*10E6< #include +#include int main() { using container_t1=absl::flat_hash_map; - using container_t2=boost::unordered_flat_map; - using container_t3=boost::unordered_map; + using container_t2=boost::unordered_map; + using container_t3=boost::unordered_flat_map; + using container_t4=boost::unordered_node_map; test< running_insertion, container_t1, container_t2, - container_t3> + container_t3, + container_t4> ( "Running insertion", "absl::flat_hash_map", + "boost::unordered_map", "boost::unordered_flat_map", - "boost::unordered_map" + "boost::unordered_node_map" ); } diff --git a/scattered_lookup.cpp b/scattered_lookup.cpp index c0bbd343..179214b3 100644 --- a/scattered_lookup.cpp +++ b/scattered_lookup.cpp @@ -1,7 +1,7 @@ /* Measuring lookup times of unordered associative containers * without duplicate elements. * - * Copyright 2013-2022 Joaquin M Lopez Munoz. + * Copyright 2013-2023 Joaquin M Lopez Munoz. * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) @@ -108,12 +108,13 @@ boost::reference_wrapper temp_cref(T&& x) template< template class Tester, - typename Container1,typename Container2,typename Container3, + typename Container1,typename Container2, + typename Container3,typename Container4, typename Data > void test( const char* title,const Data& data, - const char* name1,const char* name2,const char* name3) + const char* name1,const char* name2,const char* name3,const char* name4) { unsigned int n0=10000,n1=10000000,dn=500; double fdn=1.05; @@ -121,7 +122,7 @@ void test( initialize_data(n1); std::cout<(), temp_cref(create(n)),n,boost::cref(data))); + std::cout<<";"<<(t/n)*10E6; + + t=measure(boost::bind( + Tester(), + temp_cref(create(n)),n,boost::cref(data))); std::cout<<";"<<(t/n)*10E6< #include +#include int main() { using container_t1=absl::flat_hash_map; - using container_t2=boost::unordered_flat_map; - using container_t3=boost::unordered_map; + using container_t2=boost::unordered_map; + using container_t3=boost::unordered_flat_map; + using container_t4=boost::unordered_node_map; test< scattered_lookup, container_t1, container_t2, - container_t3> + container_t3, + container_t4> ( "Scattered successful lookup", data, "absl::flat_hash_map", + "boost::unordered_map", "boost::unordered_flat_map", - "boost::unordered_map" + "boost::unordered_node_map" ); test< scattered_lookup, container_t1, container_t2, - container_t3> + container_t3, + container_t4> ( "Scattered unsuccessful lookup", unsuccessful_data, "absl::flat_hash_map", + "boost::unordered_map", "boost::unordered_flat_map", - "boost::unordered_map" + "boost::unordered_node_map" ); }