Writing Fast Python

Image for post
Image for post
Photo by Marc-Olivier Jodoin on Unsplash

Introduction

General Guidelines

Avoid premature optimizations

Make sure using the best big-O algorithms

Understand the performance problem

Specific Advice

Know your language and tools

Image for post
Image for post

Benchmark tools

Vectorization

Take advantage of the ecosystem

JIT and complied extensions

Go to compiled languages

And beyond

Conclusion

Reference

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store