The Racket repository
![]() Inserting keys with sequential hash codes --- as in 0, 1, 2, 3, etc. --- performed badly compared to random keys, because it triggered the worst case of allocation: allocate a node of size 1, then 2, then 3, then 32, then 32 plus a subtree of size 1, then 32 plus a subtree of size 2, and so on. By rearranging the bits in a hash code, arrange for nodes that are more like 4-wide instead of 32-wide. In other words, the tree become wider with thinner branches, instead of growning just as a thick branch to the left. Of course, there's now a different sequence of inserts that used to perform well and now perform badly (the inverse of the new reordering), but that case seems much more likely than the cae of sequential inserts. |
||
---|---|---|
pkgs | ||
racket | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
.travis.yml | ||
appveyor.yml | ||
INSTALL.txt | ||
Makefile | ||
README.txt |
This is the source code for the main Racket distribution. See "INSTALL.txt" for information on building Racket. License ------- Racket Copyright (c) 2010-2016 PLT Design Inc. Racket is distributed under the GNU Lesser General Public License (LGPL). This implies that you may link Racket into proprietary applications, provided you follow the rules stated in the LGPL. You can also modify Racket; if you distribute a modified version, you must distribute it under the terms of the LGPL, which in particular states that you must release the source code for the modified software. See racket/src/COPYING_LESSER.txt for more information.