Slightly OT: settled vectors


Very interesting article about what the author calls “settled vectors” - vectors which have a massive initial size but aren’t actually allocated memory pages until you use them, particularly good for avoiding a lot of resizing when you don’t know the final size.

In particular, there’s code there, and it seems like it would translate almost directly to juce::Array…