Skip to content

feat(stdlib): standard-library BTreeMap collection - #2083

Draft
ss2165 wants to merge 16 commits into
mainfrom
codex/plan-btreemap-standard-library
Draft

ss2165 wants to merge 16 commits into
mainfrom
codex/plan-btreemap-standard-library

Conversation

@ss2165

@ss2165 ss2165 commented Jul 21, 2026

Copy link
Copy Markdown
Member

Closes #2082

Codex made

Summary

  • Add a BTreeMap collection to the Guppy standard library
  • Export the collection through std.collections
  • Add integration coverage and project configuration updates

Testing

  • Added integration tests for BTreeMap behavior

Open questions

  • Should this PR introduce the Ord protocol publicly?
  • Tests are very slow - revisit after august'26 performance improvements

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectguppylang
Branchcodex/plan-btreemap-standard-library
TestbedLinux
Click to view all benchmark results
Benchmarkhugr_bytesBenchmark Result
bytes x 1e3
(Result Δ%)
Upper Boundary
bytes x 1e3
(Limit %)
hugr_nodesBenchmark Result
nodes
(Result Δ%)
Upper Boundary
nodes
(Limit %)
tests/benchmarks/test_big_array.py::test_big_array_compile📈 view plot
🚷 view threshold
66.41 x 1e3
(0.00%)Baseline: 66.41 x 1e3
67.07 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
4,595.00
(0.00%)Baseline: 4,595.00
4,640.95
(99.01%)
tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_compile📈 view plot
🚷 view threshold
28.77 x 1e3
(0.00%)Baseline: 28.77 x 1e3
29.06 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
1,301.00
(0.00%)Baseline: 1,301.00
1,314.01
(99.01%)
tests/benchmarks/test_queue_push_pop.py::test_queue_push_benchmark_compile📈 view plot
🚷 view threshold
7.84 x 1e3
(0.00%)Baseline: 7.84 x 1e3
7.92 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
310.00
(0.00%)Baseline: 310.00
313.10
(99.01%)
tests/benchmarks/test_queue_push_pop.py::test_queue_push_pop_benchmark_compile📈 view plot
🚷 view threshold
10.78 x 1e3
(+0.01%)Baseline: 10.77 x 1e3
10.88 x 1e3
(99.02%)
📈 view plot
🚷 view threshold
411.00
(0.00%)Baseline: 411.00
415.11
(99.01%)
🐰 View full continuous benchmarking report in Bencher

@ss2165 ss2165 changed the title Add standard-library BTreeMap collection feaet(stdlib): standard-library BTreeMap collection Jul 21, 2026
@codecov-commenter

codecov-commenter commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 22.82609% with 497 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.24%. Comparing base (9ef99cd) to head (7fcaf76).

Files with missing lines Patch % Lines
...ppylang/src/guppylang/std/collections/btree_map.py 22.70% 497 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2083      +/-   ##
==========================================
- Coverage   93.19%   90.24%   -2.96%     
==========================================
  Files         152      153       +1     
  Lines       14647    15291     +644     
==========================================
+ Hits        13651    13799     +148     
- Misses        996     1492     +496     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ss2165 ss2165 changed the title feaet(stdlib): standard-library BTreeMap collection feat(stdlib): standard-library BTreeMap collection Jul 21, 2026
@codspeed-hq

codspeed-hq Bot commented Jul 21, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 11 untouched benchmarks


Comparing codex/plan-btreemap-standard-library (7fcaf76) with main (9ef99cd)

Open in CodSpeed

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.

[Feature]: collections standard library for BTreeMap

2 participants