an-cabal/an-rope

Don't split small nodes

Opened this issue · 2 comments

We should change the behavior of insert etc. to not split leaves that are below a certain size threshold. It might help with performance due to cache friendliness.

hawkw commented

I'm down for this; but I'm not gonna make it a priority, just because I think it could take a lot of effort to implement under the hood.

hawkw commented

Having done some profiling, though, it does look like this is close to the only big performance optimisation we have left – Rope.split() does spend a majority of it's time in &str.to_owned(). Avoiding splits on small strings might help us here...