

PyPy: More Compact Lists with List Strategies - DasIch
http://morepypy.blogspot.com/2011/10/more-compact-lists-with-list-strategies.html

======
mcherm
I have been more and more amazed at how powerful PyPy turns out to be. In
order to eke out a small space-and-time improvement on lists they implemented
multiple versions of lists: general-lists, integer-lists, string-lists, empty-
lists, and range-of-integer-lists. This is invisible to the programmer, who
can create a list of 3 integers and then append a string and the data
structure will silently change itself behind the scenes. They have even done
things like changing the sorting algorithm (eg: integer comparisons are super-
fast so a different sorting algorithm is optimal). That is deeply powerful
magic, and I shudder to think how difficult it would be to implement the same
features in an interpreter or compiler written in C. And all this with just a
handful of nearly-full-time programmers!

