Daily Dose of Data Science

Share this post

Probably The Fastest Way To Execute Your Python Code

www.blog.dailydoseofds.com

Probably The Fastest Way To Execute Your Python Code

So the best way to speedup python is by not using python?

Avi Chawla
Mar 27, 2023
22
2
Share
Share this post

Probably The Fastest Way To Execute Your Python Code

www.blog.dailydoseofds.com

Many Python programmers are often frustrated with Python’s run-time. Here’s how you can make your code blazingly fast by changing just one line.

Codon is an open-source, high-performance Python compiler. In contrast to being an interpreter, it compiles your python code to fast machine code.

Thus, post compilation, your code runs at native machine code speed. As a result, typical speedups are often of the order 50x or more.

According to the official docs, if you know Python, you already know 99% of Codon. There are very minute differences between the two, which you can read here: Codon docs.

Find some more benchmarking results between Python and Codon below:

Thanks for reading Daily Dose of Data Science! Subscribe for free to learn something new about Python and Data Science every day.

👉 Tell me you liked this post by leaving a heart react 🤍.

👉 If you love reading this newsletter, feel free to share it with friends!

Share Daily Dose of Data Science


Find the code for my tips here: GitHub.

I like to explore, experiment and write about data science concepts and tools. You can read my articles on Medium. Also, you can connect with me on LinkedIn and Twitter.

22
2
Share
Share this post

Probably The Fastest Way To Execute Your Python Code

www.blog.dailydoseofds.com
Previous
Next
2 Comments
Rainman
Mar 30Liked by Avi Chawla

Install tutorial for mac?

Expand full comment
Reply
1 reply by Avi Chawla
1 more comment…
Top
New
Community

No posts

Ready for more?

© 2023 Avi Chawla
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing