Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Mastering Python High Performance
  • Table Of Contents Toc
Mastering Python High Performance

Mastering Python High Performance

By : Fernando Donglio
4.2 (5)
close
close
Mastering Python High Performance

Mastering Python High Performance

4.2 (5)
By: Fernando Donglio

Overview of this book

Simply knowing how to code is not enough; on mission-critical pieces of code, every bit of memory and every CPU cycle counts, and knowing how to squish every bit of processing power out of your code is a crucial and sought-after skill. Nowadays, Python is used for many scientific projects, and sometimes the calculations done in those projects require some serious fine-tuning. Profilers are tools designed to help you measure the performance of your code and help you during the optimization process, so knowing how to use them and read their output is very handy. This book starts from the basics and progressively moves on to more advanced topics. You’ll learn everything from profiling all the way up to writing a real-life application and applying a full set of tools designed to improve it in different ways. In the middle, you’ll stop to learn about the major profilers used in Python and about some graphic tools to help you make sense of their output. You’ll then move from generic optimization techniques onto Python-specific ones, going over the main constructs of the language that will help you improve your speed without much of a change. Finally, the book covers some number-crunching-specific libraries and how to use them properly to get the best speed out of them. After reading this book, you will know how to take any Python code, profile it, find out where the bottlenecks are, and apply different techniques to remove them.
Table of Contents (10 chapters)
close
close

Chapter 7. Lightning Fast Number Crunching with Numba, Parakeet, and pandas

Number crunching is a topic specific to the programming world. However, given that Python is so often used for scientific research and data science problems, number crunching ends up being a very common topic in the Python world.

That being said, we could just as easily implement our algorithms using the information from the earlier six chapters, and we would most likely end up with pretty fast and performant code. Again, that information is meant to be for generic use cases. There will always be something to say about optimizing for a particular case.

In this chapter, we'll cover three options that will help us write faster and more optimized code focused on scientific problems. For each one, we'll go over the basic installation instructions. We will also look at some code samples showing the benefits of each option.

The tools we'll review in this chapter are as follows:

  • Numba: This is a module...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Mastering Python High Performance
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon