3 ms·
"I still vividly remember the day that Wirth decided to replace the elegant data structure used in the compiler’s symbol table handler by a mundane linear list.
by dchest 14y ago
"I still vividly remember the day that Wirth
decided to replace the elegant data structure used in the compiler’s symbol table
handler by a mundane linear list. In the original compiler, the objects in the symbol
table had been sorted in a tree data structure (in identifier lexical order) for fast
access, with a separate linear list representing their declaration order. One day Wirth
decided that there really weren’t enough objects in a typical scope to make the
sorted tree cost-effective. All of us Ph.D. students were horrified: it had taken time
to implement the sorted tree, the solution was elegant, and it worked well – so why
would one want to throw it away and replace it by something simpler, and even
worse, something as prosaic as a linear list? But of course, Wirth was right, and the
simplified compiler was both smaller and faster than its predecessor."
http://www.ics.uci.edu/~franz/Site/pubs-pdf/BC03.pdf http://www.ics.uci.edu/~franz/Site/pubs-pdf/BC03.pdf
- fusiongyro 14y agoYes, that's it! Thank you! I apparently misremembered the purpose, but at least I got the sorted tree part right. :)