Giter Site home page Giter Site logo

small-sort's Introduction

small-sort

Benchmarks for various algorithms for sorting small arrays.

CC=clang blaze build -c opt :bench_sort bazel-bin/bench_sort

results

Benchmark                                        Time           CPU Iterations
-------------------------------------------------------------------------------
BM_SmallSort<gerben::BubbleSort2>/2              3 ns          3 ns  245350000
BM_SmallSort<gerben::BubbleSort2>/4              7 ns          7 ns  101100000
BM_SmallSort<gerben::BubbleSort2>/8             22 ns         21 ns   32500000
BM_SmallSort<gerben::BubbleSort2>/16            77 ns         77 ns    9200000
BM_SmallSort<gerben::BubbleSort2>/32           284 ns        284 ns    2431250
BM_SmallSort<gerben::BubbleSort2>/64          1158 ns       1158 ns     604494
BM_SmallSort<gerben::BubbleSort2>/128         4696 ns       4696 ns     149171
BM_SmallSort<gerben::InsertionSort>/2            8 ns          8 ns   89700000
BM_SmallSort<gerben::InsertionSort>/4           27 ns         27 ns   25975000
BM_SmallSort<gerben::InsertionSort>/8           87 ns         87 ns    8100000
BM_SmallSort<gerben::InsertionSort>/16         227 ns        227 ns    3056250
BM_SmallSort<gerben::InsertionSort>/32         525 ns        524 ns    1334375
BM_SmallSort<gerben::InsertionSort>/64        1264 ns       1264 ns     549824
BM_SmallSort<gerben::InsertionSort>/128       3327 ns       3325 ns     211651
BM_SmallSort<reese::insertion_sort>/2            8 ns          8 ns   84900000
BM_SmallSort<reese::insertion_sort>/4           27 ns         27 ns   25800000
BM_SmallSort<reese::insertion_sort>/8           81 ns         81 ns    8525000
BM_SmallSort<reese::insertion_sort>/16         203 ns        203 ns    3462500
BM_SmallSort<reese::insertion_sort>/32         515 ns        515 ns    1381250
BM_SmallSort<reese::insertion_sort>/64        1419 ns       1419 ns     490468
BM_SmallSort<reese::insertion_sort>/128       4420 ns       4420 ns     158543
BM_SmallSort<gerben::SelectionSort>/2            5 ns          5 ns  136900000
BM_SmallSort<gerben::SelectionSort>/4           16 ns         16 ns   42275000
BM_SmallSort<gerben::SelectionSort>/8           52 ns         52 ns   10000000
BM_SmallSort<gerben::SelectionSort>/16         236 ns        235 ns    2681250
BM_SmallSort<gerben::SelectionSort>/32        1044 ns       1044 ns     684375
BM_SmallSort<gerben::SelectionSort>/64        3062 ns       3061 ns     226490
BM_SmallSort<gerben::SelectionSort>/128       8531 ns       8531 ns      81224

small-sort's People

Contributors

gerben-s avatar gerben-stavenga avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.