by Hounshell · 12y ago · 0 comments
"Representation" changes are fairly common as well. Typically these come about with size. There was some well known data structure (I want to say C#'s Dictionary, but a quick search disproves this) that would use an array for some small number of items (less than 10 or so), then switch to a binary tree because ultimately for a small number of items the array proved to be faster.
The examples you provide are very interesting, but they are what I like to call "internal", i.e., the user is not necessarily aware of these changes.