SortedList is a list-like class that always keeps items sorted. heaplist.SortedList
is faster than bisectlist.SortedList
but with lesser functions.
Here are some test results:
Test with 10000 random numbers...
Raw list takes 1.01116704941 seconds
Raw list, sort once takes 0.00338888168335 seconds