Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement rb::Map::remove #5599

Merged
merged 24 commits into from
Sep 5, 2023
Merged

Implement rb::Map::remove #5599

merged 24 commits into from
Sep 5, 2023

Conversation

jeffa5
Copy link

@jeffa5 jeffa5 commented Aug 30, 2023

Resolves #4146

This implements the remove function for the rb::Map, making it usable for applications that need a remove!

The main benefit of this map over the default is that keys are stored in sorted order, enabling them to be retrieved in that way too.

This also enables the removes for the rb::Map tests and adds the benchmarks for a basic thing to track

@jumaffre
Copy link
Contributor

Could you also enable KV_STATE_RB by default so that we get a full run of the CI with the RBMap as the underlying state data structure for the KV store?

@ccf-bot
Copy link
Collaborator

ccf-bot commented Aug 30, 2023

rbmap-remove@75422 aka 20230905.44 vs main ewma over 20 builds from 75075 to 75413

Click to see table

main

build_id build_number pi_basic_mt_sgx_cft^ pi_basic_mt_sgx_cft_mem Commit latency factor ls_sgx_cft^ ls_sgx_cft_mem pi_ls_sgx_cft^ pi_ls_sgx_cft_mem pi_basic_sgx_cft^ pi_basic_sgx_cft_mem pi_basic_js_sgx_cft^ pi_basic_js_sgx_cft_mem pi_basic_mt_virtual_cft^ ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem pi_ls_jwt_sgx_cft^ pi_ls_jwt_sgx_cft_mem ls_js_sgx_cft^ ls_js_sgx_cft_mem ls_virtual_cft^ pi_ls_virtual_cft^ pi_basic_virtual_cft^ ls_full_js_sgx_cft^ ls_full_js_sgx_cft_mem pi_basic_js_virtual_cft^ ls_js_jwt_sgx_cft^ ls_js_jwt_sgx_cft_mem ls_jwt_virtual_cft^ pi_ls_jwt_virtual_cft^ ls_js_virtual_cft^ ls_full_js_virtual_cft^ ls_js_jwt_virtual_cft^ hist_sgx_cft^ RB put (/s)^ CHAMP put (/s)^ RB get (/s)^ CHAMP get (/s)^
75075 20230830.2 31443.3 2.51822e+07 0.83702 16563.8 1.88908e+07 16654.7 1.05021e+07 18189.3 1.46964e+07 1657.2 1.25993e+07 86648.2 8167.29 1.88908e+07 8230.5 6.30784e+06 7047.25 1.67936e+07 43456.6 46733.1 52213.1 6593.9 1.67936e+07 4398.3 4554.07 1.88908e+07 17014 19070.9 17062.6 16817.8 9974.4 45484.8 826908 1.18068e+06 8.15254e+06 3.11507e+07
75118 20230830.13 31938.4 2.51822e+07 0.795668 16491 1.88908e+07 16680 1.05021e+07 18051 1.46964e+07 1663.1 1.25993e+07 72874.4 8112.14 1.88908e+07 7954.1 6.30784e+06 7033.9 1.67936e+07 45593.2 48059.4 52813.5 6580.25 1.67936e+07 4457.8 4552.79 1.88908e+07 17349.4 20106.6 17373.9 14942.4 9804.35 47358.5 832726 1.18129e+06 8.14764e+06 3.08745e+07
75138 20230831.1 31562.4 2.51822e+07 0.773449 16645.3 1.88908e+07 16771.3 1.05021e+07 18311.5 1.46964e+07 1663 1.25993e+07 79560.7 8210.87 1.88908e+07 8101.1 6.30784e+06 7084.23 1.67936e+07 43630.2 47411.3 52119.9 6583.37 1.67936e+07 4397.6 4562.01 1.88908e+07 17082.2 19267.5 17317.9 14683.8 10262.5 44903.6 830487 1.17891e+06 8.16955e+06 3.07873e+07
75147 20230831.5 31681.2 2.51822e+07 0.8359 16620.2 1.88908e+07 16630.1 1.05021e+07 18144.9 1.46964e+07 1666.7 1.25993e+07 81401.7 8196.8 1.88908e+07 8057.8 6.30784e+06 7048.63 1.67936e+07 45573.1 48177.4 52131.9 6608.94 1.67936e+07 4405.6 4562.55 1.88908e+07 17303.2 19827.5 17369.8 14758.6 9891.05 41701.5 830948 1.18148e+06 8.15446e+06 3.0816e+07
75161 20230831.13 31568.6 2.51822e+07 0.81577 16612.1 1.88908e+07 16689.8 1.05021e+07 18176.9 1.46964e+07 1662.5 1.25993e+07 76022.4 8177.4 1.88908e+07 8247.9 6.30784e+06 7057.42 1.67936e+07 45571.9 47766.7 53718.3 6656.13 1.67936e+07 4503 4592.61 1.88908e+07 17400.8 19874 17702.4 14986 9882.54 45490.8 835212 1.18234e+06 8.14249e+06 3.10944e+07
75179 20230901.1 31914.7 2.51822e+07 0.797232 16579.7 1.88908e+07 16750.6 1.05021e+07 18260.6 1.46964e+07 1651.5 1.25993e+07 71122.1 8210.63 1.88908e+07 8323.5 6.30784e+06 7118.74 1.67936e+07 45657.3 47855.8 53488.1 6616.41 1.67936e+07 4495.8 4612.34 1.88908e+07 17477.4 19934.6 17505.9 16835.2 9785.78 41584.1 825699 1.17706e+06 8.1735e+06 3.05134e+07
75187 20230901.5 31852.3 2.51822e+07 0.766884 16587 1.88908e+07 16666.6 1.05021e+07 18204.9 1.46964e+07 1664.1 1.25993e+07 76743.7 8202.09 1.88908e+07 8078 6.30784e+06 6682.26 1.67936e+07 45662.6 48325.3 53440.6 6598.69 1.67936e+07 4512.9 4583.19 1.88908e+07 17221 19316.2 17486.5 14957.1 9967.15 45560.3 827788 1.17683e+06 8.15403e+06 3.07134e+07
75221 20230901.20 32113.1 2.51822e+07 0.806705 16540.9 1.88908e+07 16657.1 1.05021e+07 18199.7 1.25993e+07 1658.8 1.25993e+07 67827.1 8186.95 1.88908e+07 8391.7 6.30784e+06 7065.59 1.67936e+07 45841.2 46657 51767.4 6636.06 1.67936e+07 4441.4 4580.72 1.88908e+07 17067.9 19837.3 17273 14959.9 9904.99 45518.4 836676 1.1816e+06 8.10531e+06 3.06734e+07
75234 20230901.26 31298.5 2.51822e+07 0.799024 16412 1.88908e+07 16520.2 1.05021e+07 18034.1 1.46964e+07 1640.1 1.25993e+07 81323.7 8046.24 1.88908e+07 7975.8 6.30784e+06 6617.55 1.67936e+07 45763 48415.1 52445.3 6583.32 1.67936e+07 4461.9 4562.49 1.88908e+07 17320.3 19267.1 17307.8 16727 9900.84 47832.7 814140 1.17862e+06 8.11427e+06 3.09824e+07
75255 20230904.2 31877.2 2.51822e+07 0.800459 16585.1 1.88908e+07 16649.8 1.05021e+07 18179.8 1.46964e+07 1659.1 1.25993e+07 70284.9 8133.32 1.88908e+07 8318.8 6.30784e+06 7070.58 1.67936e+07 45618.4 47656 52809.9 6589.49 1.67936e+07 4482.3 4555.83 1.88908e+07 17231.3 19040.4 15210.2 16875 9795.68 50413 834549 1.18199e+06 8.15296e+06 3.13879e+07
75265 20230904.6 31457.4 2.51822e+07 0.797237 16561.7 1.88908e+07 16683.7 1.05021e+07 18219.1 1.46964e+07 1658 1.25993e+07 63213.7 8180.61 1.88908e+07 8300.5 6.30784e+06 7057.78 1.67936e+07 45627.4 48343.5 52792.7 6644.72 1.67936e+07 4465.8 4583.56 1.88908e+07 17315 19935.4 17552.3 15100.5 9851.17 45461.7 831805 1.17771e+06 8.15034e+06 3.12653e+07
75271 20230904.8 32193.1 2.51822e+07 0.807553 16703.8 1.88908e+07 16797.4 1.05021e+07 18353.3 1.46964e+07 1655.8 1.25993e+07 78961.1 8200.03 1.88908e+07 8097.4 6.30784e+06 7074.81 1.67936e+07 45699.4 48066.8 54336.2 6593.84 1.67936e+07 4468.2 4556.21 1.88908e+07 17313.8 19411.1 16926.8 14815 9820.68 45397.8 839817 1.18163e+06 8.15446e+06 3.10369e+07
75282 20230904.12 31979.1 2.51822e+07 0.796235 16694.9 1.88908e+07 16916.6 1.05021e+07 18325.5 1.46964e+07 1648.6 1.25993e+07 79345.1 8156.02 1.88908e+07 7968.6 6.30784e+06 7040.55 1.67936e+07 45690.9 49077.3 54125.9 6637.16 1.67936e+07 4479.4 4557.13 1.88908e+07 17623.4 16298.1 17113.3 14553.5 9824.1 48180.1 834932 1.18089e+06 8.15433e+06 3.07392e+07
75288 20230904.14 32335.9 2.51822e+07 0.801078 16679.2 1.88908e+07 16871.4 1.05021e+07 18477.5 1.46964e+07 1656.9 1.25993e+07 80429.9 8152.93 1.88908e+07 8019.1 6.30784e+06 7036.64 1.67936e+07 45797.3 47838.9 53668.7 6584.04 1.67936e+07 4491.1 4551.27 1.88908e+07 17414.1 19684.7 17347 14843.7 9878.27 44845.8 830898 1.18237e+06 8.1505e+06 3.0772e+07
75300 20230905.1 32207.2 2.51822e+07 0.770774 16645.6 1.88908e+07 16823.7 1.05021e+07 18313.7 1.46964e+07 1652.3 1.25993e+07 79372.1 8180.27 1.88908e+07 8177 6.30784e+06 7051.17 1.67936e+07 45506.3 48842.4 53087.4 6596.68 1.67936e+07 4485.3 4571.26 1.88908e+07 17474.3 19306.5 17442.8 15046.5 9898.89 50271.9 821926 1.1746e+06 8.1143e+06 3.17018e+07
75314 20230905.8 32224.6 2.51822e+07 0.820898 16738.7 1.88908e+07 16868.1 1.05021e+07 18392.4 1.46964e+07 1648.2 1.25993e+07 71193 8201.26 1.88908e+07 8305.8 6.30784e+06 7067.89 1.67936e+07 45656.7 48164.7 53451 6593.78 1.67936e+07 4387.1 4587.48 1.88908e+07 17378.6 19385.9 17350.5 14763.3 10113.2 45347.1 830368 1.17868e+06 8.15579e+06 3.08615e+07
75332 20230905.15 32237.6 2.51822e+07 0.795074 16686.1 1.88908e+07 16806.5 1.05021e+07 18374.4 1.46964e+07 1663.1 1.25993e+07 73261.1 8145.3 1.88908e+07 8056.1 6.30784e+06 7062.03 1.67936e+07 45805 48010.4 53472.6 6644.82 1.67936e+07 4468.6 4549.04 1.88908e+07 17303.8 19203.1 17495.4 14979.2 9760 47860 830160 1.17693e+06 8.15631e+06 3.07813e+07
75348 20230905.21 31697 2.51822e+07 0.818926 16897 1.88908e+07 16860.5 1.05021e+07 18475.4 1.46964e+07 1657.2 1.25993e+07 69941.9 8211.83 1.88908e+07 8045.4 6.30784e+06 7058.49 1.67936e+07 45750.9 48204.9 52524 6594.25 1.67936e+07 4466 4559.4 1.88908e+07 17413.2 19456.4 17519 15001.3 10200.3 43975.4 820294 1.17696e+06 8.17128e+06 3.07581e+07
75360 20230905.26 32429.6 2.51822e+07 0.800555 16639.2 1.88908e+07 16865.9 1.05021e+07 18094.7 1.46964e+07 1629.4 1.25993e+07 75493.7 8097.92 1.88908e+07 8244.9 6.30784e+06 6577.72 1.67936e+07 45554.4 42866.8 51334.5 6573.38 1.67936e+07 4480 4545.58 1.67936e+07 17462.1 19193.1 16930.1 15179.2 9898.05 47617.4 834158 1.17952e+06 8.1542e+06 3.0816e+07
75413 20230905.41 32149.1 2.51822e+07 0.822033 16619.4 1.88908e+07 16634.2 1.05021e+07 18150.8 1.46964e+07 1640.4 1.25993e+07 84700.2 8128.27 1.88908e+07 7918 6.30784e+06 6668.1 1.67936e+07 42002.8 47678.8 53684.4 6561.8 1.67936e+07 4426.7 4544.2 1.67936e+07 17180.1 19169.9 17447.2 14839.1 10272.6 46378.9 831657 1.18593e+06 8.15381e+06 3.25544e+07

rbmap-remove

build_id build_number Commit latency factor ls_virtual_cft^ pi_ls_virtual_cft^ pi_basic_virtual_cft^ pi_basic_mt_sgx_cft^ pi_basic_mt_sgx_cft_mem pi_basic_js_virtual_cft^ ls_jwt_virtual_cft^ pi_ls_jwt_virtual_cft^ pi_basic_mt_virtual_cft^ ls_js_virtual_cft^ ls_full_js_virtual_cft^ ls_sgx_cft^ ls_sgx_cft_mem pi_ls_sgx_cft^ pi_ls_sgx_cft_mem ls_js_jwt_virtual_cft^ pi_basic_sgx_cft^ pi_basic_sgx_cft_mem pi_basic_js_sgx_cft^ pi_basic_js_sgx_cft_mem hist_sgx_cft^ ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem pi_ls_jwt_sgx_cft^ pi_ls_jwt_sgx_cft_mem ls_js_sgx_cft^ ls_js_sgx_cft_mem ls_full_js_sgx_cft^ ls_full_js_sgx_cft_mem ls_js_jwt_sgx_cft^ ls_js_jwt_sgx_cft_mem RB put (/s)^ CHAMP put (/s)^ RB get (/s)^ CHAMP get (/s)^
75229 20230901.23 0.794785 45740 47425.5 52146.4 32073.3 2.51822e+07 4307.7 17338 19477.6 72529.5 15119.9 14944.9 16626.6 1.88908e+07 16671.1 1.05021e+07 9882.69 18202.2 1.25993e+07 1662.7 1.25993e+07 48090.8 8185.62 1.88908e+07 8093.5 6.30784e+06 7066.91 1.67936e+07 6592.66 1.67936e+07 4549.4 1.88908e+07 833112 1.17743e+06 8.14842e+06 3.06188e+07
75293 20230904.15 0.792011 45813.3 47917.5 53249.2 32203.7 2.51822e+07 4503.5 17427.5 19844.8 80495.1 17187.2 14645.9 16641.4 1.88908e+07 16867.7 1.05021e+07 9891.97 18449.2 1.46964e+07 1658.5 1.25993e+07 45535.4 8194.37 1.88908e+07 8234.6 6.30784e+06 7057.06 1.67936e+07 6644.96 1.67936e+07 4555.51 1.88908e+07 834962 1.18326e+06 8.14904e+06 3.06725e+07
75341 20230905.18 0.809899 45885.4 49040 52970.5 32334.4 2.72794e+07 4516.3 17316.4 19277.1 78776.4 17086.8 14519.8 16690.7 1.88908e+07 16862 1.05021e+07 9819.87 18339.3 1.46964e+07 1651.4 1.25993e+07 45660.2 8175.65 1.88908e+07 8180.2 6.30784e+06 7065.68 1.67936e+07 6593.78 1.67936e+07 4551.91 1.88908e+07 832501 1.17863e+06 8.17581e+06 3.07554e+07
75394 20230905.35 0.803311 45585.7 48659.4 53645.4 32355.1 2.51822e+07 4418.6 17244 18930.8 82811.3 17473.6 14825.1 16607.8 1.88908e+07 16743 1.05021e+07 10269.4 18048.7 1.25993e+07 1636.2 1.25993e+07 46845.7 8122.45 1.88908e+07 7991.2 6.30784e+06 6663.71 1.67936e+07 6581.26 1.67936e+07 4587.37 1.67936e+07 834088 1.17862e+06 8.1503e+06 3.119e+07
75422 20230905.44 0.791359 44050.1 46734.2 51799.9 31711.8 2.30851e+07 4406.3 17470.6 19243 80620.3 17343.7 14753.1 16621 1.88908e+07 16751.5 1.05021e+07 10243.9 18074.5 1.46964e+07 1637.7 1.25993e+07 42736.4 8127.87 1.88908e+07 7964.1 6.30784e+06 6606.57 1.67936e+07 6578.93 1.67936e+07 4550.27 1.88908e+07 834322 1.17827e+06 8.12863e+06 3.08838e+07

images

@jeffa5 jeffa5 marked this pull request as ready for review August 30, 2023 16:03
@jeffa5 jeffa5 requested a review from a team as a code owner August 30, 2023 16:03
CMakeLists.txt Outdated Show resolved Hide resolved
@eddyashton
Copy link
Member

@jeffa5 Thanks for adding this! Can you paste the output of a map_bench run in this PR for posterity? (It's included in the CI run output but that won't last, and is harder to read in the csv formatting).

Looking at the e2e benchmarks, it looks like switching from the CHAMP to the RB currently imposes a 10-25% memory increase, and a 0-5% throughput drop. That's a viable baseline! I'm surprised the memory impact is so pronounced, and expect we can reduce that with some easy future changes (map of pointers to make roll cheaper?).

LGTM!

src/ds/rb_map.h Outdated Show resolved Hide resolved
src/ds/rb_map.h Outdated Show resolved Hide resolved
src/ds/rb_map.h Outdated Show resolved Hide resolved
Copy link
Contributor

@jumaffre jumaffre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@jeffa5
Copy link
Author

jeffa5 commented Aug 31, 2023

Output of map_bench (6348ca9):

put:
===============================================================================
   Name (baseline is *)   |   Dim   |  Total ms |  ns/op  |Baseline| Ops/second
===============================================================================
       bench_rb_map_put * |      32 |     0.022 |     702 |      - |  1423044.4
      bench_champ_map_put |      32 |     0.016 |     507 |  0.722 |  1972021.9
        bench_std_map_put |      32 |     0.000 |      15 |  0.022 | 65843621.4
  bench_std_unord_map_put |      32 |     0.000 |      13 |  0.020 | 72892938.5
       bench_rb_map_put * |     128 |     0.110 |     859 |      - |  1163308.5
      bench_champ_map_put |     128 |     0.064 |     496 |  0.577 |  2015081.6
        bench_std_map_put |     128 |     0.002 |      16 |  0.019 | 59841047.2
  bench_std_unord_map_put |     128 |     0.002 |      11 |  0.014 | 84768211.9
       bench_rb_map_put * |     512 |     0.537 |    1048 |      - |   953947.8
      bench_champ_map_put |     512 |     0.336 |     656 |  0.627 |  1522635.8
        bench_std_map_put |     512 |     0.009 |      18 |  0.018 | 53928797.1
  bench_std_unord_map_put |     512 |     0.006 |      11 |  0.011 | 89856089.9
       bench_rb_map_put * |    2048 |     2.464 |    1203 |      - |   831020.4
      bench_champ_map_put |    2048 |     1.733 |     845 |  0.703 |  1182038.6
        bench_std_map_put |    2048 |     0.047 |      22 |  0.019 | 43805612.6
  bench_std_unord_map_put |    2048 |     0.022 |      10 |  0.009 | 92787241.8
       bench_rb_map_put * |    8192 |    11.627 |    1419 |      - |   704553.5
      bench_champ_map_put |    8192 |     7.527 |     918 |  0.647 |  1088333.7
        bench_std_map_put |    8192 |     0.229 |      27 |  0.020 | 35717400.0
  bench_std_unord_map_put |    8192 |     0.087 |      10 |  0.007 | 94200982.0
===============================================================================
get:
===============================================================================
   Name (baseline is *)   |   Dim   |  Total ms |  ns/op  |Baseline| Ops/second
===============================================================================
       bench_rb_map_get * |      32 |     0.002 |      65 |      - | 15333013.9
      bench_champ_map_get |      32 |     0.001 |      27 |  0.417 | 36739380.0
        bench_std_map_get |      32 |     0.001 |      21 |  0.326 | 47058823.5
  bench_std_unord_map_get |      32 |     0.001 |      20 |  0.322 | 47690014.9
       bench_rb_map_get * |     128 |     0.011 |      85 |      - | 11661807.6
      bench_champ_map_get |     128 |     0.004 |      32 |  0.376 | 30977734.8
        bench_std_map_get |     128 |     0.003 |      21 |  0.249 | 46800731.3
  bench_std_unord_map_get |     128 |     0.002 |      17 |  0.205 | 56939501.8
       bench_rb_map_get * |     512 |     0.055 |     108 |      - |  9253569.5
      bench_champ_map_get |     512 |     0.017 |      32 |  0.305 | 30333550.6
        bench_std_map_get |     512 |     0.012 |      23 |  0.214 | 43173960.7
  bench_std_unord_map_get |     512 |     0.008 |      16 |  0.150 | 61761158.0
       bench_rb_map_get * |    2048 |     0.267 |     130 |      - |  7670929.1
      bench_champ_map_get |    2048 |     0.079 |      38 |  0.295 | 25968756.3
        bench_std_map_get |    2048 |     0.053 |      26 |  0.199 | 38455760.9
  bench_std_unord_map_get |    2048 |     0.033 |      16 |  0.125 | 61545858.9
       bench_rb_map_get * |    8192 |     1.255 |     153 |      - |  6525217.9
      bench_champ_map_get |    8192 |     0.345 |      42 |  0.275 | 23770351.5
        bench_std_map_get |    8192 |     0.225 |      27 |  0.180 | 36347824.5
  bench_std_unord_map_get |    8192 |     0.131 |      16 |  0.105 | 62308423.7
===============================================================================
getp:
===============================================================================
   Name (baseline is *)   |   Dim   |  Total ms |  ns/op  |Baseline| Ops/second
===============================================================================
      bench_rb_map_getp * |      32 |     0.002 |      48 |      - | 20486555.7
     bench_champ_map_getp |      32 |     0.000 |       6 |  0.124 |164948453.6
      bench_rb_map_getp * |     128 |     0.009 |      70 |      - | 14170264.6
     bench_champ_map_getp |     128 |     0.001 |       9 |  0.136 |104065040.7
      bench_rb_map_getp * |     512 |     0.048 |      92 |      - | 10764443.7
     bench_champ_map_getp |     512 |     0.005 |       9 |  0.097 |110918544.2
      bench_rb_map_getp * |    2048 |     0.236 |     115 |      - |  8661267.5
     bench_champ_map_getp |    2048 |     0.031 |      15 |  0.131 | 66064516.1
      bench_rb_map_getp * |    8192 |     1.131 |     138 |      - |  7242552.1
     bench_champ_map_getp |    8192 |     0.123 |      15 |  0.109 | 66477858.3
===============================================================================
foreach:
===============================================================================
   Name (baseline is *)   |   Dim   |  Total ms |  ns/op  |Baseline| Ops/second
===============================================================================
   bench_rb_map_foreach * |      32 |     0.013 |     421 |      - |  2371951.7
  bench_champ_map_foreach |      32 |     0.000 |      15 |  0.036 | 66528066.5
    bench_std_map_foreach |      32 |     0.002 |      70 |  0.168 | 14103129.1
  bench_unord_map_foreach |      32 |     0.001 |      20 |  0.049 | 48706240.5
   bench_rb_map_foreach * |     128 |     0.216 |    1684 |      - |   593705.8
  bench_champ_map_foreach |     128 |     0.017 |     130 |  0.077 |  7674321.0
    bench_std_map_foreach |     128 |     0.047 |     366 |  0.218 |  2729094.7
  bench_unord_map_foreach |     128 |     0.033 |     255 |  0.152 |  3909949.0
   bench_rb_map_foreach * |     512 |     3.487 |    6810 |      - |   146829.2
  bench_champ_map_foreach |     512 |     0.066 |     128 |  0.019 |  7793710.2
    bench_std_map_foreach |     512 |     0.998 |    1950 |  0.286 |   512793.8
  bench_unord_map_foreach |     512 |     0.518 |    1012 |  0.149 |   987469.6
   bench_rb_map_foreach * |    2048 |    55.799 |   27245 |      - |    36703.0
  bench_champ_map_foreach |    2048 |    10.170 |    4965 |  0.182 |   201384.2
    bench_std_map_foreach |    2048 |    24.382 |   11905 |  0.437 |    83995.0
  bench_unord_map_foreach |    2048 |    16.410 |    8012 |  0.294 |   124805.6
   bench_rb_map_foreach * |    8192 |   959.572 |  117135 |      - |     8537.1
  bench_champ_map_foreach |    8192 |    40.693 |    4967 |  0.042 |   201310.0
    bench_std_map_foreach |    8192 |   379.943 |   46379 |  0.396 |    21561.2
  bench_unord_map_foreach |    8192 |   253.498 |   30944 |  0.264 |    32315.8
===============================================================================
remove:
===============================================================================
   Name (baseline is *)   |   Dim   |  Total ms |  ns/op  |Baseline| Ops/second
===============================================================================
    bench_rb_map_remove * |      32 |     0.035 |    1104 |      - |   905387.1
   bench_champ_map_remove |      32 |     0.012 |     383 |  0.347 |  2606924.6
     bench_std_map_remove |      32 |     0.000 |      10 |  0.010 | 91954023.0
   bench_unord_map_remove |      32 |     0.000 |       7 |  0.006 |141592920.4
    bench_rb_map_remove * |     128 |     0.207 |    1614 |      - |   619365.8
   bench_champ_map_remove |     128 |     0.057 |     443 |  0.274 |  2257177.1
     bench_std_map_remove |     128 |     0.001 |       8 |  0.005 |122254059.2
   bench_unord_map_remove |     128 |     0.001 |       4 |  0.003 |221070811.7
    bench_rb_map_remove * |     512 |     1.137 |    2220 |      - |   450321.3
   bench_champ_map_remove |     512 |     0.292 |     569 |  0.257 |  1754572.3
     bench_std_map_remove |     512 |     0.005 |       9 |  0.004 |103476152.0
   bench_unord_map_remove |     512 |     0.002 |       3 |  0.002 |294761082.3
    bench_rb_map_remove * |    2048 |     5.570 |    2719 |      - |   367705.0
   bench_champ_map_remove |    2048 |     1.611 |     786 |  0.289 |  1271445.6
     bench_std_map_remove |    2048 |     0.026 |      12 |  0.005 | 77980428.7
   bench_unord_map_remove |    2048 |     0.007 |       3 |  0.001 |310773899.8
    bench_rb_map_remove * |    8192 |    28.426 |    3469 |      - |   288184.9
   bench_champ_map_remove |    8192 |     7.022 |     857 |  0.247 |  1166635.5
     bench_std_map_remove |    8192 |     0.134 |      16 |  0.005 | 61147105.4
   bench_unord_map_remove |    8192 |     0.026 |       3 |  0.001 |315198153.1
===============================================================================

@jumaffre jumaffre enabled auto-merge (squash) September 5, 2023 17:27
@achamayou achamayou merged commit fb4194f into microsoft:main Sep 5, 2023
17 checks passed
@jeffa5 jeffa5 deleted the rbmap-remove branch September 5, 2023 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement rb::Map::remove()
5 participants