Code Monkey home page Code Monkey logo

elixir-benchmark-collection-algorithms's Introduction

Collection Processing Benchmark

What is this?

This repo is a small Elixir performance arena for testing serial or parallel processing of big collections.

To test your algorithm:

  • Open lib/process_many.ex
  • Add your function. It must start with process_ and accept two parameters: (1) the collection and (2) a function that accepts one parameter and returns a new value. The name should ideally comprise of your GitHub username and a short description of the algorithm (e.g. mine is process_dimitarvp_parallel_chunk).
  • Run mix bench

System

Benchmark suite executing on the following system:

Operating System macOS
CPU Information Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Number of Available Cores 8
Available Memory 16 GB
Elixir Version 1.12.1
Erlang Version 23.3.4.4

Configuration

Benchmark suite executing with the following configuration:

:time 1 s
:parallel 1
:warmup 2 s

Statistics

Input: big

Run Time

Name IPS Average Devitation Median 99th %
dominik_serial_0 101.00 9.90 ms ±5.02% 10.05 ms 12.61 ms
dimitarvp_parallel_chunk 34.64 28.87 ms ±2.85% 28.95 ms 30.04 ms
dominik_parallel_0 1.36 735.78 ms ±8.15% 735.78 ms 778.16 ms

Comparison

Name IPS Slower
dominik_serial_0 101.00  
dimitarvp_parallel_chunk 34.64 2.92x
dominik_parallel_0 1.36 74.31x

Input: medium

Run Time

Name IPS Average Devitation Median 99th %
dominik_serial_0 1027.15 0.97 ms ±6.95% 0.96 ms 1.22 ms
dimitarvp_parallel_chunk 321.60 3.11 ms ±8.66% 3.10 ms 3.84 ms
dominik_parallel_0 15.05 66.43 ms ±4.06% 66.74 ms 72.42 ms

Comparison

Name IPS Slower
dominik_serial_0 1027.15  
dimitarvp_parallel_chunk 321.60 3.19x
dominik_parallel_0 15.05 68.23x

Input: small

Run Time

Name IPS Average Devitation Median 99th %
dominik_serial_0 105.35 K 9.49 μs ±25.04% 8.90 μs 16.90 μs
dimitarvp_parallel_chunk 17.32 K 57.73 μs ±19.79% 53.90 μs 106.90 μs
dominik_parallel_0 1.70 K 587.24 μs ±12.59% 578.40 μs 792.18 μs

Comparison

Name IPS Slower
dominik_serial_0 105.35 K  
dimitarvp_parallel_chunk 17.32 K 6.08x
dominik_parallel_0 1.70 K 61.86x

elixir-benchmark-collection-algorithms's People

Contributors

dimitarvp avatar nickneck avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

nickneck

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.