Git Product home page Git Product logo

sort-bench's Introduction

What is it?

This a sort benchmark in support of this related blog post.

Building

Just run make.

Currently it builds on Linux with clang or gcc, or on Windows Subsystem for Linux (WSL) with the same compilers.

In principle it could work fine on Windows with other compilers, but I haven't had time to sort out my Visual Studio Community license.

It should work on OSX with clang or gcc, although I haven't tried it.

Patches which add platform support are welcome.

Running

Run it like ./bench to run all the benchmarks, or like ./bench BENCH_NAME to run a specific benchmark (e.g., ./bench qsort to run the qsort benchmark). The benchmark names are the same as those shown in the first row when you run ./bench.

Generating the Data and Figures

You too can generate the figures from the blog post on your hardware, using the scripts in the scripts directory.

First generate the data by running scripts/data.sh. This updates the CSV file data/all.csv.

Then you can generate all the figures by running scripts/allfigs.sh. This generates the .svg figures in figures. You can also generate any figure directly by calling say scripts/fig2.sh to generate Figure 2 (which by default opens an interactive window to display the figure).

Acknowledgements

Some code in the bench.cpp and wyhash.h originates from this code written by Daniel Lemire for a blog post.

wyhash courtesy of Wang Yi.

sort-bench's People

Contributors

travisdowns avatar

Watchers

James Cloos avatar  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.