I think it would be fun to think of this in a more high-level language where data structures could be autonomously tuned by a VM or interpreter.<p>That way, you could start out with lists when prototyping and building up your app, but under the covers, at runtime, your underlying data structure could swap into something else that optimized your usage pattern. I also think that although this idea sounds fun, that it is premature optimization of the worst kind.<p>I do think that the idea of Perflint, where you do a little profiling up front as the dev, is much better than trying to use some embedded heuristics. Probably just realizing that its worth doing a little "real world data size" testing makes something Perflint valuable.