{"id":21182635,"url":"https://github.com/fandreuz/python-performance-playground","last_synced_at":"2025-07-10T00:32:41.486Z","repository":{"id":49320229,"uuid":"517185519","full_name":"fandreuz/python-performance-playground","owner":"fandreuz","description":"Performance analysis of Python snippets for scientific computing","archived":false,"fork":false,"pushed_at":"2022-10-17T00:58:31.000Z","size":26594,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-06-03T14:29:24.761Z","etag":null,"topics":["dask","high-performance-computing","numba","numpy","performance-analysis","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fandreuz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-23T23:31:28.000Z","updated_at":"2023-06-03T14:29:24.761Z","dependencies_parsed_at":"2023-01-20T04:47:54.261Z","dependency_job_id":null,"html_url":"https://github.com/fandreuz/python-performance-playground","commit_stats":null,"previous_names":["fandreuz/python-performance-playground"],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fandreuz%2Fpython-performance-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fandreuz%2Fpython-performance-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fandreuz%2Fpython-performance-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fandreuz%2Fpython-performance-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fandreuz","download_url":"https://codeload.github.com/fandreuz/python-performance-playground/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225606623,"owners_count":17495551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dask","high-performance-computing","numba","numpy","performance-analysis","python"],"created_at":"2024-11-20T17:57:33.362Z","updated_at":"2024-11-20T17:57:34.120Z","avatar_url":"https://github.com/fandreuz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Benchmarks](https://github.com/fAndreuzzi/python-performance-playground/actions/workflows/main.yml/badge.svg)](https://github.com/fAndreuzzi/python-performance-playground/actions/workflows/main.yml)\n[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/Naereen/StrapDown.js/blob/master/LICENSE)\n\u003cimg src='https://img.shields.io/badge/Code%20style-Black-%23000000'/\u003e\n\n# python-performance-playground\nA performance analysis repository for small Python snippets.\n\n## Goal\nEver felt the need to test multiple methods to solve the same, self-contained,\neasily-explainable Python problem, in order to find the most performant one?\nMe too, but I'm always too lazy to generalize the one/two lines I wrote, prepare\na function and run the experiments over a meaningful set of inputs.\n\nI've collected some of my snippets over a few months, and packed them nicely\ninto a repository, along with an accomodating GitHub action which cares about\nrunning the experiments and doing the plots.\n\n### Software and hardware\nBenchmarks may vary across Python versions, for this reason we provide plots\nfor the latest 3 stable versions:\n| **Python version** | **Branch** |\n|:---|:---|\n| `3.10` | [`master`](https://github.com/fAndreuzzi/python-performance-playground/) |\n| `3.9` | [`python-3.9`](https://github.com/fAndreuzzi/python-performance-playground/tree/python-3.9)  |\n| `3.8` | [`python-3.8`](https://github.com/fAndreuzzi/python-performance-playground/tree/python-3.8) |\n\nBenchmarks run on the GitHub Actions runner `ubuntu-latest`, updated info about\nthe hardware details of the runner available\n[here](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources).\n\n### Content\n| **Directory** | **Content** |\n|:---|:---|\n| [`./python/`](python/) | General snippets in pure Python |\n| [`./numpy/`](numpy/) | Comparisons among multiple equivalent NumPy (or Python) snippets  |\n| [`./dask/`](dask/) | Benchmarks of equivalent Dask snippets. |\n\n## Contributing\nSnippets welcome! Just prepare a PR following the standard format in the\nrepository:\n- Find the right place for your snippet (e.g. `numpy`, `python`, `dask`, ...)\n- Find an appropriate name for your snippet\n- Provide an `.ipynb` files which runs the experiments (please use the\n  annotations `@kernel, @data, ...` like we did for the other snippets)\n- Let the bot do its work (after your PR is merged).\n\n## Examples\n| Slice VS List write in NumPy |     Pseudo-Hankel matrix     |\n| -------------------------------------------------------------- | -------------------------------------------------------------- |\n| [![image](https://user-images.githubusercontent.com/8464342/180768227-b8429aa5-98cc-4a59-8277-8d00854106fb.png)](numpy/write-in-slices) | [![image](https://user-images.githubusercontent.com/8464342/180768655-5caaeb92-bd1c-4900-a2f6-d92a700d0138.png)](numpy/hankel-matrix) |\n\n## Disclaimer\n- Benchmarks in this repository are usually very simple, use dummy data and are\n  in general dried of any meaning except for the pursue for performance.\n- Benchmarks in this repository are assumed to be valid only for common\n  use-cases, while industrial or scientific applications might suffer of\n  asymptotic pathological patterns which deserve a customized treatment.\n- I do not claim in any way that benchmarks in this repository are enough to\n  provide a full view of the performance of the methods treated. For instance\n  I do not probe memory access or caching with tailored data to stress the\n  computer resources. Again, my aim is to see what happens with common\n  use-cases.\n\n## Contributors\n- Francesco Andreuzzi (CERN, SISSA) -- andreuzzi.francesco@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffandreuz%2Fpython-performance-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffandreuz%2Fpython-performance-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffandreuz%2Fpython-performance-playground/lists"}