Benchmarking run at 2021-01-11 23:29:03 -0500 ruby v2.7.2, DHeap v0.4.0 ################################################################################ # Benchmarks with N=5 (t=10sec/benchmark) ################################################################################ == push N (N=5) ================================================================ Warming up -------------------------------------- push N (bsearch) 931.441k i/s - 1.879M times in 2.017047s (1.07μs/i) push N (rb_heap) 1.012M i/s - 2.029M times in 2.005686s (988.29ns/i) push N (c_dheap) 1.665M i/s - 3.351M times in 2.012998s (600.72ns/i) Calculating ------------------------------------- push N (bsearch) 946.364k i/s - 5.589M times in 5.905389s (1.06μs/i) push N (rb_heap) 971.614k i/s - 6.071M times in 6.248476s (1.03μs/i) push N (c_dheap) 1.701M i/s - 9.988M times in 5.870725s (587.77ns/i) Comparison: push N (c_dheap): 1701338.1 i/s push N (rb_heap): 971614.1 i/s - 1.75x slower push N (bsearch): 946363.7 i/s - 1.80x slower == push N then pop N (N=5) ==================================================== Warming up -------------------------------------- push N + pop N (findmin) 816.694k i/s - 1.656M times in 2.028176s (1.22μs/i) push N + pop N (bsearch) 770.442k i/s - 1.566M times in 2.032470s (1.30μs/i) push N + pop N (rb_heap) 467.156k i/s - 971.112k times in 2.078774s (2.14μs/i) push N + pop N (c_dheap) 1.072M i/s - 2.164M times in 2.018623s (933.02ns/i) Calculating ------------------------------------- push N + pop N (findmin) 841.708k i/s - 4.900M times in 5.821693s (1.19μs/i) push N + pop N (bsearch) 773.253k i/s - 4.623M times in 5.978188s (1.29μs/i) push N + pop N (rb_heap) 471.853k i/s - 2.803M times in 5.940275s (2.12μs/i) push N + pop N (c_dheap) 1.088M i/s - 6.431M times in 5.910898s (919.16ns/i) Comparison: push N + pop N (c_dheap): 1087944.8 i/s push N + pop N (findmin): 841708.1 i/s - 1.29x slower push N + pop N (bsearch): 773252.7 i/s - 1.41x slower push N + pop N (rb_heap): 471852.9 i/s - 2.31x slower == Push/pop with pre-filled queue (size=N) (N=5) ============================== Warming up -------------------------------------- push + pop (findmin) 5.151M i/s - 10.467M times in 2.032075s (194.13ns/i, 464clocks/i) push + pop (bsearch) 4.021M i/s - 8.148M times in 2.026548s (248.72ns/i, 664clocks/i) push + pop (rb_heap) 2.158M i/s - 4.445M times in 2.059708s (463.35ns/i) push + pop (c_dheap) 5.185M i/s - 10.373M times in 2.000519s (192.86ns/i, 483clocks/i) Calculating ------------------------------------- push + pop (findmin) 5.004M i/s - 30.906M times in 6.176454s (199.84ns/i, 413clocks/i) push + pop (bsearch) 4.321M i/s - 24.124M times in 5.583405s (231.45ns/i, 647clocks/i) push + pop (rb_heap) 2.207M i/s - 12.949M times in 5.867179s (453.10ns/i) push + pop (c_dheap) 5.525M i/s - 31.111M times in 5.630456s (180.98ns/i, 458clocks/i) Comparison: push + pop (c_dheap): 5525418.8 i/s push + pop (findmin): 5003904.8 i/s - 1.10x slower push + pop (bsearch): 4320581.8 i/s - 1.28x slower push + pop (rb_heap): 2207042.0 i/s - 2.50x slower ################################################################################ # Benchmarks with N=21 (t=10sec/benchmark) ################################################################################ == push N (N=21) ============================================================== Warming up -------------------------------------- push N (bsearch) 170.251k i/s - 355.419k times in 2.087615s (5.87μs/i) push N (rb_heap) 212.048k i/s - 442.865k times in 2.088508s (4.72μs/i) push N (c_dheap) 391.469k i/s - 801.504k times in 2.047426s (2.55μs/i) Calculating ------------------------------------- push N (bsearch) 169.583k i/s - 1.022M times in 6.023633s (5.90μs/i) push N (rb_heap) 212.275k i/s - 1.272M times in 5.993587s (4.71μs/i) push N (c_dheap) 408.307k i/s - 2.349M times in 5.752569s (2.45μs/i) Comparison: push N (c_dheap): 408307.0 i/s push N (rb_heap): 212275.2 i/s - 1.92x slower push N (bsearch): 169583.2 i/s - 2.41x slower == push N then pop N (N=21) ==================================================== Warming up -------------------------------------- push N + pop N (findmin) 166.784k i/s - 344.938k times in 2.068173s (6.00μs/i) push N + pop N (bsearch) 145.768k i/s - 304.502k times in 2.088957s (6.86μs/i) push N + pop N (rb_heap) 69.234k i/s - 143.020k times in 2.065750s (14.44μs/i) push N + pop N (c_dheap) 198.924k i/s - 414.304k times in 2.082722s (5.03μs/i) Calculating ------------------------------------- push N + pop N (findmin) 162.025k i/s - 1.001M times in 6.176244s (6.17μs/i) push N + pop N (bsearch) 146.284k i/s - 874.605k times in 5.978803s (6.84μs/i) push N + pop N (rb_heap) 72.289k i/s - 415.403k times in 5.746419s (13.83μs/i) push N + pop N (c_dheap) 199.435k i/s - 1.194M times in 5.984617s (5.01μs/i) Comparison: push N + pop N (c_dheap): 199435.5 i/s push N + pop N (findmin): 162024.5 i/s - 1.23x slower push N + pop N (bsearch): 146284.3 i/s - 1.36x slower push N + pop N (rb_heap): 72289.0 i/s - 2.76x slower == Push/pop with pre-filled queue (size=N) (N=21) ============================== Warming up -------------------------------------- push + pop (findmin) 4.230M i/s - 8.548M times in 2.020984s (236.43ns/i, 633clocks/i) push + pop (bsearch) 3.257M i/s - 6.630M times in 2.035714s (307.06ns/i, 669clocks/i) push + pop (rb_heap) 1.544M i/s - 3.159M times in 2.045247s (647.47ns/i) push + pop (c_dheap) 4.705M i/s - 9.501M times in 2.019236s (212.53ns/i, 533clocks/i) Calculating ------------------------------------- push + pop (findmin) 4.467M i/s - 25.378M times in 5.680532s (223.84ns/i, 551clocks/i) push + pop (bsearch) 3.345M i/s - 19.540M times in 5.840823s (298.91ns/i, 831clocks/i) push + pop (rb_heap) 1.560M i/s - 9.267M times in 5.938451s (640.83ns/i) push + pop (c_dheap) 4.837M i/s - 28.231M times in 5.836574s (206.75ns/i, 591clocks/i) Comparison: push + pop (c_dheap): 4836860.0 i/s push + pop (findmin): 4467453.9 i/s - 1.08x slower push + pop (bsearch): 3345458.4 i/s - 1.45x slower push + pop (rb_heap): 1560476.3 i/s - 3.10x slower ################################################################################ # Benchmarks with N=85 (t=10sec/benchmark) ################################################################################ == push N (N=85) ============================================================== Warming up -------------------------------------- push N (bsearch) 33.491k i/s - 69.846k times in 2.085516s (29.86μs/i) push N (rb_heap) 43.880k i/s - 91.665k times in 2.089004s (22.79μs/i) push N (c_dheap) 93.190k i/s - 193.557k times in 2.077020s (10.73μs/i) Calculating ------------------------------------- push N (bsearch) 33.118k i/s - 200.945k times in 6.067575s (30.20μs/i) push N (rb_heap) 47.069k i/s - 263.278k times in 5.593458s (21.25μs/i) push N (c_dheap) 96.077k i/s - 559.138k times in 5.819670s (10.41μs/i) Comparison: push N (c_dheap): 96077.3 i/s push N (rb_heap): 47068.9 i/s - 2.04x slower push N (bsearch): 33117.8 i/s - 2.90x slower == push N then pop N (N=85) ==================================================== Warming up -------------------------------------- push N + pop N (findmin) 27.530k i/s - 57.351k times in 2.083246s (36.32μs/i) push N + pop N (bsearch) 29.264k i/s - 59.283k times in 2.025786s (34.17μs/i) push N + pop N (rb_heap) 13.281k i/s - 27.783k times in 2.091902s (75.29μs/i) push N + pop N (c_dheap) 42.532k i/s - 87.318k times in 2.052993s (23.51μs/i) Calculating ------------------------------------- push N + pop N (findmin) 27.615k i/s - 165.177k times in 5.981465s (36.21μs/i) push N + pop N (bsearch) 29.643k i/s - 175.585k times in 5.923305s (33.73μs/i) push N + pop N (rb_heap) 13.267k i/s - 79.687k times in 6.006463s (75.38μs/i) push N + pop N (c_dheap) 41.943k i/s - 255.192k times in 6.084224s (23.84μs/i) Comparison: push N + pop N (c_dheap): 41943.2 i/s push N + pop N (bsearch): 29643.1 i/s - 1.41x slower push N + pop N (findmin): 27614.8 i/s - 1.52x slower push N + pop N (rb_heap): 13266.9 i/s - 3.16x slower == Push/pop with pre-filled queue (size=N) (N=85) ============================== Warming up -------------------------------------- push + pop (findmin) 3.070M i/s - 6.171M times in 2.009864s (325.70ns/i, 854clocks/i) push + pop (bsearch) 2.693M i/s - 5.458M times in 2.026866s (371.36ns/i) push + pop (rb_heap) 1.285M i/s - 2.598M times in 2.021618s (778.13ns/i) push + pop (c_dheap) 4.250M i/s - 8.596M times in 2.022749s (235.30ns/i, 676clocks/i) Calculating ------------------------------------- push + pop (findmin) 3.221M i/s - 18.422M times in 5.719316s (310.46ns/i, 843clocks/i) push + pop (bsearch) 2.721M i/s - 16.157M times in 5.937334s (367.48ns/i, 815clocks/i) push + pop (rb_heap) 1.219M i/s - 7.711M times in 6.326403s (820.46ns/i) push + pop (c_dheap) 4.309M i/s - 25.499M times in 5.917551s (232.07ns/i, 615clocks/i) Comparison: push + pop (c_dheap): 4309094.2 i/s push + pop (findmin): 3221024.5 i/s - 1.34x slower push + pop (bsearch): 2721221.4 i/s - 1.58x slower push + pop (rb_heap): 1218828.1 i/s - 3.54x slower ################################################################################ # Benchmarks with N=341 (t=10sec/benchmark) ################################################################################ == push N (N=341) ============================================================== Warming up -------------------------------------- push N (bsearch) 6.749k i/s - 13.500k times in 2.000413s (148.18μs/i) push N (rb_heap) 11.089k i/s - 23.142k times in 2.086845s (90.18μs/i) push N (c_dheap) 24.122k i/s - 50.652k times in 2.099804s (41.46μs/i) Calculating ------------------------------------- push N (bsearch) 6.480k i/s - 40.491k times in 6.248994s (154.33μs/i) push N (rb_heap) 11.533k i/s - 66.536k times in 5.769108s (86.71μs/i) push N (c_dheap) 24.443k i/s - 144.733k times in 5.921130s (40.91μs/i) Comparison: push N (c_dheap): 24443.5 i/s push N (rb_heap): 11533.2 i/s - 2.12x slower push N (bsearch): 6479.6 i/s - 3.77x slower == push N then pop N (N=341) ================================================== Warming up -------------------------------------- push N + pop N (findmin) 3.022k i/s - 6.100k times in 2.018293s (330.87μs/i) push N + pop N (bsearch) 5.731k i/s - 11.660k times in 2.034429s (174.48μs/i) push N + pop N (rb_heap) 2.587k i/s - 5.200k times in 2.009894s (386.52μs/i) push N + pop N (c_dheap) 9.199k i/s - 19.341k times in 2.102558s (108.71μs/i) Calculating ------------------------------------- push N + pop N (findmin) 2.987k i/s - 18.134k times in 6.070835s (334.78μs/i) push N + pop N (bsearch) 6.084k i/s - 34.388k times in 5.651801s (164.35μs/i) push N + pop N (rb_heap) 2.485k i/s - 15.523k times in 6.246007s (402.37μs/i) push N + pop N (c_dheap) 9.378k i/s - 55.192k times in 5.885032s (106.63μs/i) Comparison: push N + pop N (c_dheap): 9378.4 i/s push N + pop N (bsearch): 6084.4 i/s - 1.54x slower push N + pop N (findmin): 2987.1 i/s - 3.14x slower push N + pop N (rb_heap): 2485.3 i/s - 3.77x slower == Push/pop with pre-filled queue (size=N) (N=341) ============================ Warming up -------------------------------------- push + pop (findmin) 1.521M i/s - 3.136M times in 2.061814s (657.42ns/i) push + pop (bsearch) 2.204M i/s - 4.426M times in 2.007702s (453.65ns/i) push + pop (rb_heap) 979.272k i/s - 2.030M times in 2.073290s (1.02μs/i) push + pop (c_dheap) 3.709M i/s - 7.536M times in 2.031644s (269.60ns/i, 700clocks/i) Calculating ------------------------------------- push + pop (findmin) 1.546M i/s - 9.127M times in 5.904088s (646.91ns/i) push + pop (bsearch) 2.183M i/s - 13.226M times in 6.058119s (458.04ns/i) push + pop (rb_heap) 973.052k i/s - 5.876M times in 6.038353s (1.03μs/i) push + pop (c_dheap) 3.896M i/s - 22.255M times in 5.712835s (256.69ns/i, 748clocks/i) Comparison: push + pop (c_dheap): 3895683.1 i/s push + pop (bsearch): 2183202.6 i/s - 1.78x slower push + pop (findmin): 1545816.8 i/s - 2.52x slower push + pop (rb_heap): 973051.6 i/s - 4.00x slower ################################################################################ # Benchmarks with N=1365 (t=10sec/benchmark) ################################################################################ == push N (N=1365) ============================================================ Warming up -------------------------------------- push N (bsearch) 1.371k i/s - 2.800k times in 2.041823s (729.22μs/i) push N (rb_heap) 2.863k i/s - 6.006k times in 2.097685s (349.26μs/i) push N (c_dheap) 5.730k i/s - 11.840k times in 2.066292s (174.52μs/i) Calculating ------------------------------------- push N (bsearch) 1.362k i/s - 8.227k times in 6.041325s (734.33μs/i) push N (rb_heap) 2.615k i/s - 17.178k times in 6.568916s (382.40μs/i) push N (c_dheap) 5.775k i/s - 34.380k times in 5.953356s (173.16μs/i) Comparison: push N (c_dheap): 5774.9 i/s push N (rb_heap): 2615.0 i/s - 2.21x slower push N (bsearch): 1361.8 i/s - 4.24x slower == push N then pop N (N=1365) ================================================== Warming up -------------------------------------- push N + pop N (findmin) 196.660 i/s - 400.000 times in 2.033965s (5.08ms/i) push N + pop N (bsearch) 1.197k i/s - 2.457k times in 2.052435s (835.34μs/i) push N + pop N (rb_heap) 539.093 i/s - 1.080k times in 2.003367s (1.85ms/i) push N + pop N (c_dheap) 2.012k i/s - 4.158k times in 2.066145s (496.91μs/i) Calculating ------------------------------------- push N + pop N (findmin) 193.288 i/s - 1.179k times in 6.099704s (5.17ms/i) push N + pop N (bsearch) 1.282k i/s - 7.182k times in 5.602801s (780.12μs/i) push N + pop N (rb_heap) 528.397 i/s - 3.234k times in 6.120397s (1.89ms/i) push N + pop N (c_dheap) 2.073k i/s - 12.074k times in 5.824461s (482.40μs/i) Comparison: push N + pop N (c_dheap): 2073.0 i/s push N + pop N (bsearch): 1281.9 i/s - 1.62x slower push N + pop N (rb_heap): 528.4 i/s - 3.92x slower push N + pop N (findmin): 193.3 i/s - 10.72x slower == Push/pop with pre-filled queue (size=N) (N=1365) ============================ Warming up -------------------------------------- push + pop (findmin) 493.933k i/s - 1.023M times in 2.071688s (2.02μs/i) push + pop (bsearch) 1.972M i/s - 3.978M times in 2.017663s (507.20ns/i) push + pop (rb_heap) 813.919k i/s - 1.646M times in 2.021751s (1.23μs/i) push + pop (c_dheap) 2.969M i/s - 6.033M times in 2.032182s (336.83ns/i, 846clocks/i) Calculating ------------------------------------- push + pop (findmin) 493.104k i/s - 2.964M times in 6.010080s (2.03μs/i) push + pop (bsearch) 2.002M i/s - 11.830M times in 5.908100s (499.43ns/i) push + pop (rb_heap) 831.926k i/s - 4.884M times in 5.870129s (1.20μs/i) push + pop (c_dheap) 3.117M i/s - 17.813M times in 5.714019s (320.77ns/i, 787clocks/i) Comparison: push + pop (c_dheap): 3117453.6 i/s push + pop (bsearch): 2002296.0 i/s - 1.56x slower push + pop (rb_heap): 831926.4 i/s - 3.75x slower push + pop (findmin): 493104.4 i/s - 6.32x slower ################################################################################ # Benchmarks with N=5461 (t=10sec/benchmark) ################################################################################ == push N (N=5461) ============================================================ Warming up -------------------------------------- push N (bsearch) 271.804 i/s - 567.000 times in 2.086065s (3.68ms/i) push N (rb_heap) 708.260 i/s - 1.440k times in 2.033152s (1.41ms/i) push N (c_dheap) 1.523k i/s - 3.171k times in 2.082653s (656.78μs/i) Calculating ------------------------------------- push N (bsearch) 268.014 i/s - 1.630k times in 6.081766s (3.73ms/i) push N (rb_heap) 682.522 i/s - 4.249k times in 6.225438s (1.47ms/i) push N (c_dheap) 1.494k i/s - 9.135k times in 6.113865s (669.28μs/i) Comparison: push N (c_dheap): 1494.1 i/s push N (rb_heap): 682.5 i/s - 2.19x slower push N (bsearch): 268.0 i/s - 5.57x slower == push N then pop N (N=5461) ================================================== Warming up -------------------------------------- push N + pop N (findmin) 12.484 i/s - 26.000 times in 2.082741s (80.11ms/i) push N + pop N (bsearch) 250.220 i/s - 520.000 times in 2.078172s (4.00ms/i) push N + pop N (rb_heap) 115.535 i/s - 240.000 times in 2.077301s (8.66ms/i) push N + pop N (c_dheap) 454.895 i/s - 920.000 times in 2.022444s (2.20ms/i) Calculating ------------------------------------- push N + pop N (findmin) 12.423 i/s - 74.000 times in 5.956886s (80.50ms/i) push N + pop N (bsearch) 247.409 i/s - 1.501k times in 6.066870s (4.04ms/i) push N + pop N (rb_heap) 112.159 i/s - 693.000 times in 6.178754s (8.92ms/i) push N + pop N (c_dheap) 452.913 i/s - 2.729k times in 6.025436s (2.21ms/i) Comparison: push N + pop N (c_dheap): 452.9 i/s push N + pop N (bsearch): 247.4 i/s - 1.83x slower push N + pop N (rb_heap): 112.2 i/s - 4.04x slower push N + pop N (findmin): 12.4 i/s - 36.46x slower == Push/pop with pre-filled queue (size=N) (N=5461) ============================ Warming up -------------------------------------- push + pop (findmin) 124.542k i/s - 250.908k times in 2.014649s (8.03μs/i) push + pop (bsearch) 1.610M i/s - 3.242M times in 2.013150s (620.93ns/i) push + pop (rb_heap) 704.201k i/s - 1.416M times in 2.010517s (1.42μs/i) push + pop (c_dheap) 2.563M i/s - 5.170M times in 2.017119s (390.19ns/i) Calculating ------------------------------------- push + pop (findmin) 122.316k i/s - 747.250k times in 6.109176s (8.18μs/i) push + pop (bsearch) 1.794M i/s - 9.663M times in 5.387620s (557.55ns/i) push + pop (rb_heap) 707.140k i/s - 4.225M times in 5.975062s (1.41μs/i) push + pop (c_dheap) 2.718M i/s - 15.377M times in 5.656979s (367.89ns/i) Comparison: push + pop (c_dheap): 2718225.1 i/s push + pop (bsearch): 1793546.4 i/s - 1.52x slower push + pop (rb_heap): 707139.9 i/s - 3.84x slower push + pop (findmin): 122316.0 i/s - 22.22x slower ################################################################################ # Benchmarks with N=21845 (t=10sec/benchmark) ################################################################################ == push N (N=21845) ============================================================ Warming up -------------------------------------- push N (bsearch) 35.384 i/s - 72.000 times in 2.034790s (28.26ms/i) push N (rb_heap) 172.946 i/s - 360.000 times in 2.081571s (5.78ms/i) push N (c_dheap) 364.900 i/s - 740.000 times in 2.027956s (2.74ms/i) Calculating ------------------------------------- push N (bsearch) 34.023 i/s - 212.000 times in 6.231133s (29.39ms/i) push N (rb_heap) 174.336 i/s - 1.037k times in 5.948268s (5.74ms/i) push N (c_dheap) 368.253 i/s - 2.189k times in 5.944276s (2.72ms/i) Comparison: push N (c_dheap): 368.3 i/s push N (rb_heap): 174.3 i/s - 2.11x slower push N (bsearch): 34.0 i/s - 10.82x slower == push N then pop N (N=21845) ================================================ Warming up -------------------------------------- push N + pop N (findmin) 0.779 i/s - 2.000 times in 2.566006s (1.28s/i) push N + pop N (bsearch) 34.145 i/s - 72.000 times in 2.108676s (29.29ms/i) push N + pop N (rb_heap) 24.870 i/s - 51.000 times in 2.050656s (40.21ms/i) push N + pop N (c_dheap) 102.725 i/s - 209.000 times in 2.034560s (9.73ms/i) Calculating ------------------------------------- push N + pop N (findmin) 0.777 i/s - 4.000 times in 5.148214s (1.29s/i) push N + pop N (bsearch) 33.931 i/s - 204.000 times in 6.012272s (29.47ms/i) push N + pop N (rb_heap) 25.005 i/s - 149.000 times in 5.958910s (39.99ms/i) push N + pop N (c_dheap) 101.482 i/s - 616.000 times in 6.070050s (9.85ms/i) Comparison: push N + pop N (c_dheap): 101.5 i/s push N + pop N (bsearch): 33.9 i/s - 2.99x slower push N + pop N (rb_heap): 25.0 i/s - 4.06x slower push N + pop N (findmin): 0.8 i/s - 130.61x slower == Push/pop with pre-filled queue (size=N) (N=21845) ========================== Warming up -------------------------------------- push + pop (findmin) 13.737k i/s - 27.540k times in 2.004757s (72.79μs/i) push + pop (bsearch) 1.512M i/s - 3.037M times in 2.008949s (661.44ns/i) push + pop (rb_heap) 606.616k i/s - 1.239M times in 2.042544s (1.65μs/i) push + pop (c_dheap) 2.034M i/s - 4.134M times in 2.032566s (491.70ns/i) Calculating ------------------------------------- push + pop (findmin) 15.583k i/s - 82.423k times in 5.289229s (64.17μs/i) push + pop (bsearch) 1.575M i/s - 9.071M times in 5.760389s (635.03ns/i) push + pop (rb_heap) 611.005k i/s - 3.640M times in 5.956897s (1.64μs/i) push + pop (c_dheap) 2.264M i/s - 12.203M times in 5.389179s (441.64ns/i) Comparison: push + pop (c_dheap): 2264291.2 i/s push + pop (bsearch): 1574732.8 i/s - 1.44x slower push + pop (rb_heap): 611005.2 i/s - 3.71x slower push + pop (findmin): 15583.2 i/s - 145.30x slower ################################################################################ # Benchmarks with N=87381 (t=10sec/benchmark) ################################################################################ == push N (N=87381) ============================================================ Warming up -------------------------------------- push N (bsearch) 2.973 i/s - 6.000 times in 2.017930s (336.32ms/i) push N (rb_heap) 43.444 i/s - 90.000 times in 2.071609s (23.02ms/i) push N (c_dheap) 93.043 i/s - 190.000 times in 2.042069s (10.75ms/i) Calculating ------------------------------------- push N (bsearch) 2.929 i/s - 17.000 times in 5.805017s (341.47ms/i) push N (rb_heap) 43.528 i/s - 260.000 times in 5.973114s (22.97ms/i) push N (c_dheap) 92.841 i/s - 558.000 times in 6.010303s (10.77ms/i) Comparison: push N (c_dheap): 92.8 i/s push N (rb_heap): 43.5 i/s - 2.13x slower push N (bsearch): 2.9 i/s - 31.70x slower == push N then pop N (N=87381) ================================================ Warming up -------------------------------------- push N + pop N (findmin)0.0 i/s - 0.0 times in 15.004208s (Infs/i) push N + pop N (bsearch) 2.904 i/s - 6.000 times in 2.066042s (344.34ms/i) push N + pop N (rb_heap) 5.506 i/s - 12.000 times in 2.179391s (181.62ms/i) push N + pop N (c_dheap) 22.529 i/s - 48.000 times in 2.130599s (44.39ms/i) Calculating ------------------------------------- push N + pop N (findmin)0.0 i/s - 0.0 times in 15.004208s (Infs/i) push N + pop N (bsearch) 2.861 i/s - 17.000 times in 5.942237s (349.54ms/i) push N + pop N (rb_heap) 5.540 i/s - 33.000 times in 5.956511s (180.50ms/i) push N + pop N (c_dheap) 22.614 i/s - 135.000 times in 5.969706s (44.22ms/i) Comparison: push N + pop N (c_dheap): 22.6 i/s push N + pop N (rb_heap): 5.5 i/s - 4.08x slower push N + pop N (bsearch): 2.9 i/s - 7.90x slower push N + pop N (findmin): 0.0 i/s - Infx slower == Push/pop with pre-filled queue (size=N) (N=87381) ========================== Warming up -------------------------------------- push + pop (findmin) 2.275k i/s - 4.683k times in 2.058769s (439.63μs/i) push + pop (bsearch) 682.628k i/s - 1.372M times in 2.010489s (1.46μs/i) push + pop (rb_heap) 519.439k i/s - 1.058M times in 2.037582s (1.93μs/i) push + pop (c_dheap) 1.713M i/s - 3.455M times in 2.016970s (583.83ns/i) Calculating ------------------------------------- push + pop (findmin) 2.263k i/s - 13.647k times in 6.031111s (441.94μs/i) push + pop (bsearch) 762.343k i/s - 4.096M times in 5.372602s (1.31μs/i) push + pop (rb_heap) 535.914k i/s - 3.117M times in 5.815555s (1.87μs/i) push + pop (c_dheap) 1.815M i/s - 10.277M times in 5.661404s (550.88ns/i) Comparison: push + pop (c_dheap): 1815277.3 i/s push + pop (bsearch): 762343.2 i/s - 2.38x slower push + pop (rb_heap): 535913.6 i/s - 3.39x slower push + pop (findmin): 2262.8 i/s - 802.24x slower