While some people scoff at the use of Red-Black Binary Trees in newLISP over hash tables. To me, they are the compelling reason I am drawn to use newLISP ;)From the newLISP FAQ:
6. Does newLISP have hash tables?
newLISP has fast and scalable symbol processing using red-black binary trees . Symbols in newLISP are used to build dictionaries for associative data access, similar to how hash tables are used in other scripting languages. See the newLISP manual for more details.
See: Problems with Hash Tablers:
http://enfranchisedmind.com/blog/2008/0 ... sh-tables/
Now there appears to be a better method to impliment this data structure!
Robert Sedgewick, of the Department of Computer Science at Princeton University, recently gave a talk on an improved version of Red-Black trees called, Left-Leaning Red-Black Trees. (Sedgewick co-authored the 1978 paper that gave Red-Black Trees their name.)
In this talk, he shows how to reduce the Java code for Red-Black Trees from 400+ lines to under 80 lines. Yikes!!! (Although he doesn't show timings, the code reduction of this method should be more effiecent, hence faster.)
He also created an interesting PDF file on his talk, complete with explainations of how various Binary Tree methods work.
http://www.cs.princeton.edu/~rs/talks/LLRB/RedBlack.pdf
(Note: 12+ megabyte Adobe PDF file.)
Dr. Robert Sedgewick is also the author of the famed "Algorithms in C/C++/Java" books.
http://www.cs.princeton.edu/~rs/
-- xytroxon