Skip to content
Benchmark of singular min max and range versions
C++
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
MinMaxBench
.gitignore
LICENSE
README.md

README.md

minmaxbench

Benchmark of singular min max and iterator versions

CodeProject Article

VC++ update 16.4, /Ox

         manual min:  592ms, result:1
            std min:  630ms, result:1
    std min_element: 1889ms, result:1

         manual max:  832ms, result:1000000
            std max:  585ms, result:1000000
    std max_element: 1891ms, result:1000000

     manual min max:  816ms, result:1,1000000
      std min & max:  762ms, result:1,1000000
 std minmax_element: 2143ms, result:1,1000000

Clang++ 6.0.0, -O3

         manual min:  521ms, result:1
            std min:  419ms, result:1
    std min_element:  386ms, result:1

         manual max:  416ms, result:1000000
            std max:  445ms, result:1000000
    std max_element:  428ms, result:1000000

     manual min max:  701ms, result:1,1000000
      std min & max:  969ms, result:1,1000000
 std minmax_element:  514ms, result:1,1000000

G++ 7.4.0, -O3

         manual min:  801ms, result:1
            std min:  810ms, result:1
    std min_element:  808ms, result:1

         manual max:  566ms, result:1000000
            std max:  552ms, result:1000000
    std max_element:  555ms, result:1000000

     manual min max:  799ms, result:1,1000000
      std min & max:  796ms, result:1,1000000
 std minmax_element: 2052ms, result:1,1000000
You can’t perform that action at this time.