Giter Site home page Giter Site logo

fandreuz / python-performance-playground Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 25.97 MB

Performance analysis of Python snippets for scientific computing

License: MIT License

Python 100.00%
dask high-performance-computing numba numpy python performance-analysis

python-performance-playground's Introduction

Benchmarks GitHub license

python-performance-playground

A performance analysis repository for small Python snippets.

Goal

Ever felt the need to test multiple methods to solve the same, self-contained, easily-explainable Python problem, in order to find the most performant one? Me too, but I'm always too lazy to generalize the one/two lines I wrote, prepare a function and run the experiments over a meaningful set of inputs.

I've collected some of my snippets over a few months, and packed them nicely into a repository, along with an accomodating GitHub action which cares about running the experiments and doing the plots.

Software and hardware

Benchmarks may vary across Python versions, for this reason we provide plots for the latest 3 stable versions:

Python version Branch
3.10 master
3.9 python-3.9
3.8 python-3.8

Benchmarks run on the GitHub Actions runner ubuntu-latest, updated info about the hardware details of the runner available here.

Content

Directory Content
./python/ General snippets in pure Python
./numpy/ Comparisons among multiple equivalent NumPy (or Python) snippets
./dask/ Benchmarks of equivalent Dask snippets.

Contributing

Snippets welcome! Just prepare a PR following the standard format in the repository:

  • Find the right place for your snippet (e.g. numpy, python, dask, ...)
  • Find an appropriate name for your snippet
  • Provide an .ipynb files which runs the experiments (please use the annotations @kernel, @data, ... like we did for the other snippets)
  • Let the bot do its work (after your PR is merged).

Examples

Slice VS List write in NumPy Pseudo-Hankel matrix
image image

Disclaimer

  • Benchmarks in this repository are usually very simple, use dummy data and are in general dried of any meaning except for the pursue for performance.
  • Benchmarks in this repository are assumed to be valid only for common use-cases, while industrial or scientific applications might suffer of asymptotic pathological patterns which deserve a customized treatment.
  • I do not claim in any way that benchmarks in this repository are enough to provide a full view of the performance of the methods treated. For instance I do not probe memory access or caching with tailored data to stress the computer resources. Again, my aim is to see what happens with common use-cases.

Contributors

python-performance-playground's People

Contributors

fandreuz avatar github-actions[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jeffcarpenter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.