I’ve been writing Ruby code for the past 10+ years, and recently due to my masters courses, I’ve been writing a lot of Python. While there are many differences, one area of similarity is their performance characteristics and how code can be optimized. In this post I’m going to look at a bit of Python code I optimized recently, and then compare the process of making this code faster to the process
![Lifelong Rubyist makes some Python code 5x Faster](https://cdn-ak-scissors.b.st-hatena.com/image/square/ab180b5ab23bb0da565b0ccbd5c6ab6555d56f84/height=288;version=1;width=512/https%3A%2F%2Fwww.schneems.com%2Fassets%2Fimages%2Fog%2Fruby-python-fast-b451c4130b0b25e4f401ae9d3be5c82a92e8d2ab1940166fa5a8be6608a5b200.png)