Coder Social home page Coder Social logo

1brc's Introduction

The One Billion Row Challenge - Ruby Edition

Ruby edition of the 1BRC Java challenge.

I am using asdf to install ruby versions: 3.2.2 and 3.3.0

Tools

Gemfile

I included a profiler so you can tweak your implementation and create the fastest one!

bundle install

bundle exec ruby-prof create_measurements.rb -- 20

Note: initial usage for me was to create the measurements.txt file...

time_measurements_creation

Bash script to output 5 times per ruby version its time execution...

# 200 iterations
# create_measurements.rb script outputs measurements.txt file

./time_measurements_creation 200 create_measurements.rb

average_execution

Outputs metrics about the execution real time of the ruby versions...

./average_execution

calculate_average.rb

The main script. This is where the solution goes!

ruby calculate_average.rb
# Kolkata - min: 26.7, max: 36.7, avg: 31.690693763139457
# Guadalajara - min: 20.9, max: 30.9, avg: 25.91096780180013
# ...

1brc's People

Contributors

vanhalt 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.