File tree Expand file tree Collapse file tree 6 files changed +507
-0
lines changed
pyperformance/data-files/benchmarks Expand file tree Collapse file tree 6 files changed +507
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,22 @@ These benchmarks also have an "eager" flavor that uses asyncio eager task factor
7676if available.
7777
7878
79+ btree
80+ -----
81+
82+ Benchmark a pure-Python implementation of a B-tree data structure. The tree
83+ is created with a relatively large number of nodes (default is 200,000). This
84+ attempts to simulate an application that operates on a large number of objects
85+ in memory (at least, large compared to other benchmarks currently in this
86+ suite). There are two variations of this benchmark: `btree ` records the time to
87+ create the B-tree, run `gc.collect() ` and then do some operations on it; the
88+ `btree_gc_only ` variant records only the time to run `gc.collect() ` and it
89+ skips the operations after creation.
90+
91+ Note that this benchmark does not create any reference cycles that the garbage
92+ collector will need to break to free memory.
93+
94+
7995chameleon
8096---------
8197
Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ asyncio_tcp <local>
2525asyncio_tcp_ssl <local:asyncio_tcp>
2626asyncio_websockets <local>
2727bpe_tokeniser <local>
28+ btree <local>
29+ btree_gc_only <local:btree>
2830concurrent_imap <local>
2931coroutines <local>
3032coverage <local>
Original file line number Diff line number Diff line change 1+ [tool .pyperformance ]
2+ name = " btree_gc"
3+ extra_opts = [" all" ]
Original file line number Diff line number Diff line change 1+ [tool .pyperformance ]
2+ name = " btree_gc"
3+ extra_opts = [" --gc-only" ]
Original file line number Diff line number Diff line change 1+ [project ]
2+ name = " pyperformance_bm_btree"
3+ requires-python = " >=3.8"
4+ dependencies = [" pyperf" ]
5+ urls = {repository = " https://github.com/python/pyperformance" }
6+ dynamic = [" version" ]
7+
8+ [tool .pyperformance ]
9+ name = " btree"
You can’t perform that action at this time.
0 commit comments