Skip to content

Instantly share code, notes, and snippets.

Avatar
💚

Tobias Pfeiffer PragTob

💚
View GitHub Profile
View system_info
tobi@speedy:~$ uname -a
Linux speedy 5.4.0-42-generic #46~18.04.1-Ubuntu SMP Fri Jul 10 07:21:24 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
tobi@speedy:~$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 4
@PragTob
PragTob / rubykon_deoptimize.txt
Created Aug 11, 2020
Rubykon Graal deoptimizations
View rubykon_deoptimize.txt
tobi@speedy:~/github/rubykon(main)$ ruby --jvm -v
truffleruby 20.1.0, like ruby 2.6.5, GraalVM CE JVM [x86_64-linux]
tobi@speedy:~/github/rubykon(main)$ ruby --jvm --experimental-options --engine.TraceTransferToInterpreter --engine.BackgroundCompilation=false benchmark/mcts_avg.rb
Running your benchmark...
--------------------------------------------------------------------------------
[engine] transferToInterpreter at
Array#[]((core):1) <split-133c56f7>
Rubykon::Board#neighbours_of(lib/rubykon/board.rb:50)
Rubykon::MoveValidator#no_suicide_move?(lib/rubykon/move_validator.rb:38)
Rubykon::MoveValidator#trusted_valid?(lib/rubykon/move_validator.rb:18)
View string_bench_result.txt
Operating System: Linux
CPU Information: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
Number of Available Cores: 8
Available memory: 15.61 GB
Elixir 1.9.1
Erlang 22.0
Benchmark suite executing with the following configuration:
warmup: 2 s
time: 5 s
@PragTob
PragTob / bench_result.txt
Created Sep 19, 2019
spigot_bench_result
View bench_result.txt
Operating System: Linux
CPU Information: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
Number of Available Cores: 8
Available memory: 15.61 GB
Elixir 1.9.0
Erlang 22.0
Benchmark suite executing with the following configuration:
warmup: 2 s
time: 5 s
View jruby
Using Java adoptopenjdk-8.212
Running jruby-9.1.17.0
jruby 9.1.17.0 (2.3.3) 2018-04-20 d8b1ff9 OpenJDK 64-Bit Server VM 25.212-b03 on 1.8.0_212-b03 +jit [linux-x86_64]
Running your benchmark...
--------------------------------------------------------------------------------
Finished warm up for 19x19 1_000 iterations, running the real bechmarks now
Finished measuring the run time for 19x19 1_000 iterations
Benchmarking finished, here are your reports...
Warm up results:
@PragTob
PragTob / reuse.ex
Created Jul 5, 2019
statistex reuse example
View reuse.ex
iex> Statistex.variance([4, 9, 11, 12, 17, 5, 8, 12, 12], sample_size: 9, average: 10.0)
16.0
@PragTob
PragTob / statistex.exs
Last active Jul 5, 2019
Statistex statistis/2
View statistex.exs
iex> samples = [1, 3.0, 2.35, 11.0, 1.37, 35, 5.5, 10, 0, 2.35]
iex> Statistex.statistics(samples)
%Statistex{
average: 7.156999999999999,
frequency_distribution: %{
0 => 1,
1 => 1,
10 => 1,
35 => 1,
1.37 => 1,
View percentiles_prop.exs
check all samples <- list_of(float(), min_length: 1) do
percies = percentiles(samples, [25, 50, 75, 90, 99])
assert percies[25] <= percies[50]
assert percies[50] <= percies[75]
assert percies[75] <= percies[90]
assert percies[90] <= percies[99]
end
View statistex_test.exs
check all samples <- list_of(float(), min_length: 1) do
stats = statistics(samples)
assert stats.sample_size >= 1
assert stats.minimum <= stats.maximum
assert stats.minimum <= stats.average
assert stats.average <= stats.maximum
assert stats.minimum <= stats.median
View gist:f937029439e4b16de5809c666546ef15
tobi@speedy:~/github/elixir_boards_benchmark(master)$ mix run benchmark.exs
================= Getting and setting full board ====================
Operating System: Linux
CPU Information: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
Number of Available Cores: 8
Available memory: 15.61 GB
Elixir 1.8.2
You can’t perform that action at this time.