Why do decodable collections in stdlib not reserve capacity?

(Adrian Zubarev) #1

I was reading some of the internal implementations in the stdlib and noticed that none of the decodable collections in stdlib reserve capacity before appending decoded elements.

Do I miss something or why wouldn't we just include this line everywhere?


(Itai Ferber) #2

From my end, there’s no reason for this beyond oversight — I think we can just do it in a bug fix if someone is willing to file a JIRA and put up a PR :slight_smile:

(Adrian Zubarev) #3

Okay, then I'll do it tomorrow.