Python has a lot of optimizations like in the latest Python release, they actually made them the dicked class. You could use built-in data structures instead of creating your own. One of the best examples of this is that I saw some guy who wrote his own dictionary class and it was a lot slower than in human geo code base.