Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rasbt/One-Python-benchmark-per-day
An ongoing fun challenge where I'll try to post one Python benchmark per day.
https://github.com/rasbt/One-Python-benchmark-per-day
cython numpy python-benchmark
Last synced: 3 months ago
JSON representation
An ongoing fun challenge where I'll try to post one Python benchmark per day.
- Host: GitHub
- URL: https://github.com/rasbt/One-Python-benchmark-per-day
- Owner: rasbt
- License: gpl-3.0
- Created: 2014-05-07T05:30:08.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-23T16:47:00.000Z (over 9 years ago)
- Last Synced: 2024-05-14T00:06:17.253Z (6 months ago)
- Topics: cython, numpy, python-benchmark
- Language: HTML
- Size: 10.4 MB
- Stars: 131
- Watchers: 33
- Forks: 32
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
An ongoing project for benchmarking different Python approaches - ideally one per day!
![logo](./images/logo.png)
I would be happy to hear your comments and suggestions.
Please feel free to drop me a note via
[twitter](https://twitter.com/rasbt), [email](mailto:[email protected]), or [google+](https://plus.google.com/118404394130788869227).
- **Day 1** - Reversing strings [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day1_string_reverse.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day1_string_reverse.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day1_string_reverse.ipynb)]
- **Day 2** - Calculating sample means [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day2_mean_values.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day2_mean_values.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day2_mean_values.ipynb)]
- **Day 3** - 6 different ways to count elements using a dict [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day3_dictionary_counting.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day3_dictionary_counting.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day3_dictionary_counting.ipynb)]
- **Day 4** - Python vs. Cython vs. Numba [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day4_python_cython_numba.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day4_python_cython_numba.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day4_python_cython_numba.ipynb)]
- **Day 4.2** - (C)Python compilers - Cython vs. Numba vs. Parakeet [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day4_2_cython_numba_parakeet.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day4_2_cython_numba_parakeet.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day4_2_cython_numba_parakeet.ipynb)]
- **Day 5** - Comparing 9 ways for flattening lists of sublists [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day5_flattening_lists.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day5_flattening_lists.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day5_flattening_lists.ipynb)]
- **Day 6** - Determining if a string is a number [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day6_string_is_number.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day6_string_is_number.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day6_string_is_number.ipynb)]
- **Day 7** - Speeding up NumPy array expressions with Numexpr [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day7_numpy_numexpr.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day7_numpy_numexpr.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day7_numpy_numexpr.ipynb)]
- **Day 7.2** - Just-in-time compilers for NumPy array expressions [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day7_2_jit_numpy.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day7_2_jit_numpy.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day7_2_jit_numpy.ipynb)]
- **Day 8** - Calculating square roots and exponents [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day8_sqrt_and_exp.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day8_sqrt_and_exp.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day8_sqrt_and_exp.ipynb)]
- **Day 9** - The most Pythonic way to check if a string ends with a particular substring [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day9_string_endswith.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day9_string_endswith.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day9_string_endswith.ipynb)]
- **Day 10** - Cython - Bridging the gap between Python and Fortran [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day10_fortran_lstsqr.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day10_fortran_lstsqr.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day10_fortran_lstsqr.ipynb)]
- **Day 11** - The `deque` container data type [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day11_deque_container.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day11_deque_container.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day11_deque_container.ipynb)]
- **Day 12** - Lightning fast insertion into sorted lists via the `bisect` module [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day12_insert_into_sorted_list.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day12_insert_into_sorted_list.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day12_insert_into_sorted_list.ipynb)]
- **Day 13** - Parallel processing via the multiprocessing module [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day13_multiprocessing_intro.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/multiprocessing_intro.ipynb)] [[raw](https://github.com/rasbt/python_reference/blob/master/tutorials/multiprocessing_intro.ipynb)]
- **Day 14** - Python's and NumPy's in-place operator functions [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day14_inplace_operators.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day14_inplace_operators.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day14_inplace_operators.ipynb)]
- **Day 15** - Array indexing in NumPy: Extracting rows and columns [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day15_array_indexing_numpy.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day15_array_indexing_numpy.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day15_array_indexing_numpy.ipynb)]
- **Day 16** - Vectorizing a classic for-loop in NumPy [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day16_numpy_vectorization.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day16_numpy_vectorization.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day16_numpy_vectorization.ipynb)]
- **Day 17** - Stacking NumPy arrays [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day17_numpy_stacking.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day17_numpy_stacking.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day17_numpy_stacking.ipynb)]
- **Day 18** - The scikit-learn preprocessing module for feature scaling [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day18_sckit_preprocessing.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day18_sckit_preprocessing.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day18_sckit_preprocessing.ipynb)]
- **Day 19** - Python 2.7.x's `izip` and `xrange` [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day19_izip_and_xrange.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day19_izip_and_xrange.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day19_izip_and_xrange.ipynb)]
- **Day 20** - Calculating the difference between successive elements in a Python list [[html](http://htmlpreview.github.io/?https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/htmls/day20_difference_list.html)] [[IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day20_difference_list.ipynb)] [[raw](https://github.com/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day20_difference_list.ipynb)]