Sha256: c0e21327adea662fad7b1c87f9d6781a03e7741e2f5da89be4bbece9c02344a8

Contents?: true

Size: 750 Bytes

Versions: 1

Compression:

Stored size: 750 Bytes

Contents

---
prelude: |
  system("#{RbConfig.ruby} bin/rake compile", err: :out, exception: true)
  require "d_heap/benchmarks"
  include DHeap::Benchmarks
  fill_random_vals

  n = ENV.fetch("BENCH_N", 1000).to_i

benchmark:
  - script: &script |
       q << random_val
       q.pop
    name:    "push + pop (findmin)"
    prelude: "q = FindMin.new(n) { random_val }"
  - script: *script
    name:    "push + pop (bsearch)"
    prelude: "q = BSearch.new(n) { random_val }"
  - script: *script
    name:    "push + pop (rb_heap)"
    prelude: "q = RbHeap.new(n) { random_val }"
  - script: *script
    name:    "push + pop (c++ stl)"
    prelude: "q = initq CppSTL, n"
  - script: *script
    name:    "push + pop (c_dheap)"
    prelude: "q = initq DHeap, n"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
d_heap-0.5.0 benchmarks/push_pop.yml