trim

fun trim()

Trim the internal arrays to the current size. This is useful when the map will not be modified anymore.

Requires a full copy of the arrays, so it is not recommended to be used frequently. It also means next insertion will require another copy.