Python Segment Tree Cpp Performance Placentia