The inline trim could make increment pretty expensive if it is being executed in a tight loop in the user's code. Looks like it would currently do to linear scans of the map for every increment. Thoughts?