auto: major treemap performance improvements

For integers this reduces insertion time by ~50% and reduces removal time by ~50%.