File tree Expand file tree Collapse file tree
pyperformance/data-files/benchmarks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,6 +102,22 @@ Available benchmarks:
102102See the `base64 module <https://docs.python.org/dev/library/base64.html >`_.
103103
104104
105+ btree
106+ -----
107+
108+ Benchmark a pure-Python implementation of a B-tree data structure. The tree
109+ is created with a relatively large number of nodes (default is 200,000). This
110+ attempts to simulate an application that operates on a large number of objects
111+ in memory (at least, large compared to other benchmarks currently in this
112+ suite). There are two variations of this benchmark: `btree ` records the time to
113+ create the B-tree, run `gc.collect() ` and then do some operations on it; the
114+ `btree_gc_only ` variant records only the time to run `gc.collect() ` and it
115+ skips the operations after creation.
116+
117+ Note that this benchmark does not create any reference cycles that the garbage
118+ collector will need to break to free memory.
119+
120+
105121chameleon
106122---------
107123
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ asyncio_tcp_ssl <local:asyncio_tcp>
2626asyncio_websockets <local>
2727base64 <local>
2828bpe_tokeniser <local>
29+ btree <local>
30+ btree_gc_only <local:btree>
2931concurrent_imap <local>
3032coroutines <local>
3133coverage <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.9"
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