Good old-fashioned code optimization never goes out of style

Sometimes, making your Python data processing software faster doesn’t require libraries like NumPy or Pandas, or specialized techniques like vectorization.
In fact, if you’re doing string processing, libraries like Pandas won’t help.

Pushing calculation down to a faster implementation is just one way to speed up software.
Another way to get faster results is to remove code that is redundant, repetitive, superfluous, needless, or otherwise does unnecessary work.
The fastest software, after all, is software that doesn’t run at all.

In short, sometimes all you need is some good old-fashioned speed optimization.

An example

Let’s say you’re reading in some data that has a large number of street names, which can be written in a variety of inconsistent ways.
“Brattle St” might also be written

 

 

 

To finish reading, please visit source site