![]() This commit adds an (unused) implementation of immutable hash tables for Racket CS that trades some run-time performance for an especially compact representation --- similar to the traditional Racket implementation of immutable hash tables. It uses a new "stencil vector" datatype at the Chez Scheme level, which overlays the bitmap needed for a HAMT node with the Chez-object type tag (and also provides an update operation that avoids unnecessary memory work). Compared to the current Racket CS implementation, the stencil-vector HAMT implementation of an immutable hash table takes only about 1/3 the space on avergae, which translates to a overall 5% savings in DrRacket's initial heap. It also makes a full Racket build slightly faster by reducing avergage memory use by 5-10%. But the run-time performance difference is significant, especially for the `hash-keys-subset?` operation (at least in microbenchmarks), and also for addition and iteration. Maybe there's an overall better point that reduces memory use of the current Patricia trie implementation without sacrificing as much performance. Besides the benchmarks and stencil-vector HAMT implementaiton, there are small changes to the way hash tables cooperate with `equal?`, which makes it a little easier to plug in different implementations. |
||
---|---|---|
.github | ||
.gitlab | ||
pkgs | ||
racket | ||
.gitattributes | ||
.gitignore | ||
.gitlab-ci.yml | ||
.mailmap | ||
.travis.yml | ||
build.md | ||
LICENSE | ||
Makefile | ||
README.md |
Racket is a general-purpose programming language and an ecosystem for language-oriented programming.
This repository holds the source code for the core of Racket plus some related packages. The rest of the Racket distribution source code is in other repositories, mostly under the Racket GitHub organization.
Quick Start
Pre-built versions of Racket for a variety of operating systems and architectures, as well as convenient source distributions are available at
https://download.racket-lang.org
Racket comes with extensive documentation, including several tutorials. You can read all of this documentation, as well as documentation for third-party packages at
Building from Source
For information on building Racket from this repository, see the Build Guide.
Contributing
Contribute to Racket by submitting a pull request, reporting an issue, joining the development mailing list, or visiting the IRC or Slack channels.
By making a contribution, you are agreeing that your contribution is licensed under the Apache 2.0 and MIT licenses. Those licenses are available in this repository in the files LICENSE-APACHE.txt and LICENSE-MIT.txt.
License
Racket is free software; see LICENSE for more details.