Giter Site home page Giter Site logo

1brc.pl's Introduction

1brc.pl

1 Billion Record Challenge in Perl

Original challenge for Java: https://github.com/gunnarmorling/1brc

I used the generate.c file (Source repo) to generate a billion measurements. Compile with gcc generate.c -lm and then run ./a.out 1000000000 to generate the measurements.txt file.

Some numbers

My machine specs:

Model name: AMD first gen Ryzen 5 1600 (hexacore machine)

Memory usage stays low during the run.

Original baseline.pl solution from the forked repo ran on my computer in about 30 minutes:

real	29m40.231s
user	29m33.098s
sys		0m6.567s

With 4 processes, it runs in 5 minutes:

real	5m24.577s
user	21m28.761s
sys	0m6.857s

With 8, it runs a bit faster:

real	3m44.463s
user	26m50.545s
sys	0m7.720s

Since my machine is a hexacore and has hyperthreading, I can theorically go to 12 but I feel this was already good enough for running it.

The results file are in this repo. I diffed them with the baseline to make sure the output is exactly the same, so there are (presumably) no errors in my multi-processed version.

1brc.pl's People

Contributors

adriaandens avatar gustafe avatar

Stargazers

 avatar  avatar

Forkers

mestia

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.