Python Segment Tree Cpp Performance Henderson