Git Product home page Git Product logo

see-experiments's Introduction

Simple Execution Environment (SEE) experiments

This repository has a simple test application from Joe Armstrong's Programming Erlang 2nd Edition.

Unlike every other use of Erlang and Elixir, SEE doesn't load OTP. As a result, it is about the smallest and fastest loading Erlang app possible.

To try it out, install erlang and run:

$ make
$ ./see hello
Hello, World!

Example benchmark run

Install hyperfine first and then:

$ make bench
hyperfine "/home/fhunleth/.asdf/installs/erlang/25.2/bin/erl -eval 'halt()'" "/home/fhunleth/.asdf/installs/erlang/25.2/bin/erl -boot ./see -environment '' -load hello" "python3 -c 'exit()'" "/usr/bin/ruby -e 'exit'" --warmup 20
Benchmark 1: /home/fhunleth/.asdf/installs/erlang/25.2/bin/erl -eval 'halt()'
  Time (mean ± σ):     265.8 ms ±  16.5 ms    [User: 175.5 ms, System: 83.5 ms]
  Range (min … max):   245.0 ms … 299.3 ms    11 runs

Benchmark 2: /home/fhunleth/.asdf/installs/erlang/25.2/bin/erl -boot ./see -environment '' -load hello
  Time (mean ± σ):      52.1 ms ±  10.3 ms    [User: 39.0 ms, System: 38.1 ms]
  Range (min … max):    43.7 ms …  73.1 ms    65 runs

  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet PC without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.

Benchmark 3: python3 -c 'exit()'
  Time (mean ± σ):      24.3 ms ±   2.4 ms    [User: 19.7 ms, System: 4.6 ms]
  Range (min … max):    12.9 ms …  28.2 ms    212 runs

  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet PC without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.

Benchmark 4: /usr/bin/ruby -e 'exit'
  Time (mean ± σ):      48.6 ms ±   7.2 ms    [User: 39.4 ms, System: 9.2 ms]
  Range (min … max):    45.7 ms …  71.8 ms    63 runs

  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet PC without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.

Summary
  'python3 -c 'exit()'' ran
    2.00 ± 0.36 times faster than '/usr/bin/ruby -e 'exit''
    2.14 ± 0.47 times faster than '/home/fhunleth/.asdf/installs/erlang/25.2/bin/erl -boot ./see -environment '' -load hello'
   10.93 ± 1.29 times faster than '/home/fhunleth/.asdf/installs/erlang/25.2/bin/erl -eval 'halt()''

see-experiments's People

Contributors

fhunleth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.