Title: Benchmarks for common python I/O patterns · Issue #399 · python/pyperformance · GitHub
Open Graph Title: Benchmarks for common python I/O patterns · Issue #399 · python/pyperformance
X Title: Benchmarks for common python I/O patterns · Issue #399 · python/pyperformance
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...
Open Graph 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 perf...
X 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 ...
Opengraph URL: https://github.com/python/pyperformance/issues/399
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Benchmarks for common python I/O patterns","articleBody":"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](https://github.com/python/cpython/issues/120754) and others have [gh-117151: IO performance improvement, increase io.DEFAULT_BUFFER_SIZE to 128k](https://github.com/python/cpython/issues/117151)), it would be nice to have more general benchmarks to validate I/O performance for common cases.\n\nTalking 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.\n\nGeneral I/O shapes I'm hoping to add benchmarks for:\n - read/write all of the byes of a file in a single call (including pathlib.Path.read_text, pathlib.Path.write_text)\n - read/write many small files (ex. `.pyc` files, maybe just `compile_all`?)\n - streaming bytes read/write (ex. to a pipe / console such as stdin/stdout/stderr, non-seekable devices)\n - read/write a zipfile, tarfile (read + seek, write + seek, in particular buffering behavior)\n - use `zipimport`\n - Create a `zipapp`\n - Multi-threaded write to stdout, stderr (ex. logging in a large application/codebase)\n\nNote: With these aiming to stay at the Binary / Bytes IO layer as much as possible (not touch Text I/O for now)","author":{"url":"https://github.com/cmaloney","@type":"Person","name":"cmaloney"},"datePublished":"2025-06-10T05:57:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/399/pyperformance/issues/399"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b8c16cd1-22b5-bb55-97fc-22bf93634eaf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CB06:2DC926:253022:34B40B:696FA295 |
| html-safe-nonce | 6a3ab04097caed9168c0a9bd6ec5a7f015686f7a6e6761746c8846d5c09c61f1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjA2OjJEQzkyNjoyNTMwMjI6MzRCNDBCOjY5NkZBMjk1IiwidmlzaXRvcl9pZCI6IjMwMzQ3MjAwMTA3NDg1MzU0NDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 25e6e4fcd49856bcd95b626d8e138f189f6379b546a7c84412f626decdb8f6a9 |
| hovercard-subject-tag | issue:3132241762 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/pyperformance/399/issue_layout |
| twitter:image | https://opengraph.githubassets.com/95afb9d850a7211ed39b213134538d088778371e0546f25f3419112bc2d3074a/python/pyperformance/issues/399 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/95afb9d850a7211ed39b213134538d088778371e0546f25f3419112bc2d3074a/python/pyperformance/issues/399 |
| og:image:alt | 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 perf... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cmaloney |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0ca8d8c65612640b9a1a588b3eed68222ca723ed2d028b18fe81b28936d535eb |
| turbo-cache-control | no-preview |
| go-import | github.com/python/pyperformance git https://github.com/python/pyperformance.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 65949828 |
| octolytics-dimension-repository_nwo | python/pyperformance |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 65949828 |
| octolytics-dimension-repository_network_root_nwo | python/pyperformance |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 95f60616ce2765d1114fe6da4af405a58c6d26d2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width