Benchmarks for common python I/O patterns
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- performance
Research direction
Review the existing pyperformance benchmark organization and the proposed I/O shapes in this issue, keeping the scope at the Binary/Bytes IO layer. Define a manually runnable group covering the selected common cases, then verify that it is not enabled by default and that the benchmarks exercise the intended file, stream, archive, import, or concurrency patterns.
Written by the indexing model from the issue text.
Description
As work happens on I/O pieces I've been building specialized micro-benchmarks (ex. gh-120754 Speed up open().read() pattern by reducing the number of system calls and others have gh-117151: IO performance improvement, increase io.DEFAULT_BUFFER_SIZE to 128k), it would be nice to have more general benchmarks to validate I/O performance for common cases.
Talking a little with people at PyConUS there was some interest in the tests, and a general desire for I/O tests not to be enabled by default, but to be a group which can be manually run.
General I/O shapes I'm hoping to add benchmarks for:
- read/write all of the byes of a file in a single call (including pathlib.Path.read_text, pathlib.Path.write_text)
- read/write many small files (ex.
.pycfiles, maybe justcompile_all?) - streaming bytes read/write (ex. to a pipe / console such as stdin/stdout/stderr, non-seekable devices)
- read/write a zipfile, tarfile (read + seek, write + seek, in particular buffering behavior)
- use
zipimport - Create a
zipapp - Multi-threaded write to stdout, stderr (ex. logging in a large application/codebase)
Note: With these aiming to stay at the Binary / Bytes IO layer as much as possible (not touch Text I/O for now)
- Dominant language
- Python
- Stars
- 1k
- Forks
- 203
- Avg merge
- 1h 20m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from python/pyperformance
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
python/pyperformance#346 · 3 comments ·
-
python/pyperformance#474 · 4 reactions · 1 assignee ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
python/pyperformance#473 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
python/pyperformance#464 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
python/pyperformance#460 · 2 comments · 1 reaction ·
All issues in python/pyperformance
Similar issues
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DiamondLightSource/dodal#2211 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openml/openml-python#1749 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sipyourdrink-ltd/bernstein#6191 ·