Skip to content

Instantly share code, notes, and snippets.

View RomainFranceschini's full-sized avatar

Romain Franceschini RomainFranceschini

View GitHub Profile
@RomainFranceschini
RomainFranceschini / queuing_system.cr
Last active April 26, 2020 00:21
Playing with queues and Discrete-Event Simulations in Crystal using Quartz
require "quartz"
require "statistics"
require "tablo"
include Statistics::Distributions
include Quartz
class Arrival < AtomicModel
output :user
precision :milli

Keybase proof

I hereby claim:

  • I am rumenzu on github.
  • I am rumenzu (https://keybase.io/rumenzu) on keybase.
  • I have a public key ASCtLGxO5vxNuWWjPxuceTmolSSxvMDC5DzV0D7U-6px3go

To claim this, I am signing this object:

@RomainFranceschini
RomainFranceschini / scishards.md
Last active March 13, 2018 10:13
A list of Crystal shards for science

A list of Crystal shards for science

Linear algebra

  • crystal-gsl - GNU Scientific Library bindings
  • crystalla - library for Numerical Methods. It binds to LAPACK and is unashamedly inspired by Numpy
  • linalg - Linear algebra library inspired by MATLAB and SciPy.linalg
  • linprog - Wrapper for Coin-OR SYMPHONY library - LP and MILP solver
  • crystaledge - A pure Vector Math library

Optimization

The following results and those shown on the chart are obtained using OpenJDK7 on Ubuntu
Models Ruby 2.1.2 jruby-1.7.13 rbx-2.2.10
3000 64.379486 37.682 29.618011
JRuby becomes fastest when I run the benchmark on my MacBook with HotSpot 1.8
Models Ruby 2.1.2 jruby-1.7.13 rbx-2.2.10
3000 77.023007 31.381 33.223119
Obviously, something was wrong with my previous chart (https://twitter.com/romain1189/status/486443279589056512). As the results were generated with my MacBook, something skewed the result. Maybe TimeMachine or something. Apologizes for this.
@RomainFranceschini
RomainFranceschini / gist:6ee524638f97f3fe1449
Last active August 29, 2015 14:03
DEVStone benchmark
# To run this benchmark
# $ git clone https://github.com/devs-ruby/devs .
# $ gem build devs.gemspec && gem install devs-0.5.1.gem
# $ gem install devs-models
# $ git clone https://github.com/devs-ruby/devstone .
# $ gem build devs.gemspec && gem install devstone-0.0.1.gem
require 'devstone'
opt_base = {