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: github.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:95c008d4-7e31-7794-781a-eaf667408e7d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 85B6:29E881:39A7E0:502FBA:696A458A |
| html-safe-nonce | 39b5c38ba73bffc33a6fbd33334f6dd04aad29aa8a13dbae947a7826c7de22d7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NUI2OjI5RTg4MTozOUE3RTA6NTAyRkJBOjY5NkE0NThBIiwidmlzaXRvcl9pZCI6IjM5MzY2NjM0NjkzMjU2OTg0NDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | dc5e33485dee7da494efba7b480d9dd4aee4923c0b2b3db06149cc941b2243ac |
| 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 | 3f871c8e07f0ae1886fa8dac284166d28b09ad5bada6476fc10b674e489788ef |
| 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 | 63c426b30d262aba269ef14c40e3c817b384cd61 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width