FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add the 'btree' benchmark. by nascheme · Pull Request #381 · python/pyperformance · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) .rst  (1) .toml  (3) No extension  (1) All 4 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
16 changes: 16 additions & 0 deletions doc/benchmarks.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,22 @@ Available benchmarks:
See the `base64 module <https://docs.python.org/dev/library/base64.html>`_.


btree
-----

Benchmark a pure-Python implementation of a B-tree data structure. The tree
is created with a relatively large number of nodes (default is 200,000). This
attempts to simulate an application that operates on a large number of objects
in memory (at least, large compared to other benchmarks currently in this
suite). There are two variations of this benchmark: `btree` records the time to
create the B-tree, run `gc.collect()` and then do some operations on it; the
`btree_gc_only` variant records only the time to run `gc.collect()` and it
skips the operations after creation.

Note that this benchmark does not create any reference cycles that the garbage
collector will need to break to free memory.


chameleon
---------

Expand Down
2 changes: 2 additions & 0 deletions pyperformance/data-files/benchmarks/MANIFEST
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ asyncio_tcp_ssl <local:asyncio_tcp>
asyncio_websockets <local>
base64 <local>
bpe_tokeniser <local>
btree <local>
btree_gc_only <local:btree>
concurrent_imap <local>
coroutines <local>
coverage <local>
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tool.pyperformance]
name = "btree_gc"
extra_opts = ["all"]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tool.pyperformance]
name = "btree_gc"
extra_opts = ["--gc-only"]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[project]
name = "pyperformance_bm_btree"
requires-python = ">=3.9"
dependencies = ["pyperf"]
urls = {repository = "https://github.com/python/pyperformance"}
dynamic = ["version"]

[tool.pyperformance]
name = "btree"
Loading
Loading

Back | FazBrowse Home | New Git URL