![]() With recent improvements, the run-time performance of vector-stencil HAMTs for immutable hash tables seems close enough (on microbenchmarks) to the Patricia-trie implementation to be worthwhile, since they use less memory. Performance remains better in most cases than the traditional Racket implementation. The table at the end of this message summarizes relative performance on microbenchmarks. Overall, though, immutable hash-table operations are already so fast that these difference very rarely translate to measurable differences in overall run times --- not even for the macro expander, which relies heavily on immutable hash tables to represent scope sets. Stencil-vector HAMTs tend to take about 1/3 the space of Patricia tries, and those space savings can turn into run-time improvements in applications by reducing GC time. I've observed a 10% reduction in compile time for some programs. When building a full Racket distribution, run time shrinks by about 2 minutes out of 80 minutes, probbaly because just average memory use goes down by 10%. DrRacket's initial memory footprint goes down by about 37M out of 657M (a 5% savings). Mincrobenchmark relative performance, normalized to previous Racket CS implementation (measured on 2018 MacBook Pro, 2.7 GHz Core i7; Chez Scheme can substitute POPCNT instructions at link time): patricia = previous Racket CS implementation as a Patricia Trie stencil = new Racket CS implementation as a stencil-vector HAMT racket = traditional Racket implementation patricia stencil racket set-in-empty:eq#t: ==| ==| ==|= set-many:eq#t: ==| ==|== ==|======== set-many-in-order:eq#t: ==| ==| ==|==== set-same:eq#t: ==| == ==|= set-in-empty:eq: ==| == ==|= set-many:eq: ==| ==|== ==|======== set-many-in-order:eq: ==| ==|= ==|===== set-same:eq: ==| == ==|= set-in-empty:eqv: ==| ==| ==|== set-many:eqv: ==| ==|== ==|========= set-many-in-order:eqv: ==| ==|= ==|===== set-same:eqv: ==| ==| ==|= set-in-empty:equal: ==| ==|== ==|=== set-many:equal: ==| ==|== ==|===== set-many-in-order:equal: ==| ==|= ==|=== set-same:equal: ==| ==|= ==|=== ref:eq#t: ==| ==| ==|= ref-fail:eq#t: ==| ==| == ref:eq: ==| ==| ==|= ref-fail:eq: ==| ==| == ref:eqv: ==| ==| ==|==== ref-fail:eqv: ==| ==| ==| ref:equal: ==| ==| ==|=== ref-large:equal: ==| ==| == ref-fail:equal: ==| ==| ==|=== ref-large-fail:equal: ==| ==| == removes:eq#t: ==| ==|=== ==|=========== add+remove:eq#t: ==| ==|= ==|======= removes:eq: ==| ==|==== ==|============ add+remove:eq: ==| ==|= ==|======= removes:eqv: ==| ==|=== ==|============= add+remove:eqv: ==| ==| ==|======== removes:equal: ==| ==|== ==|======= add+remove:equal: ==| ==|= ==|====== iterate-keys:eq: ==| ==| ==|= iterate-vals:eq#t: ==| ==|= ==|= iterate-vals:eq: ==| ==|= ==|= iterate-unsafe-keys:eq: ==| ==| ==|======= iterate-unsafe-vals:eq#t: ==| ==| ==| iterate-unsafe-vals:eq: ==| ==|= ==| for-each:eq: ==| ==| ==|========== subset-lil-shared:eq: ==| ==| ==|= subset-lil-unshared:eq: ==| ==| ==|== subset-lil-not:eq: ==| == == subset-med+lil-shared:eq: ==| ==|==== ==|= subset-med+med-shared:eq: ==| ==|= ==|= subset-big-same:eq: ==| ==| ==|=============== subset-big+lil-shared:eq: ==| ==|=== ==|==== subset-big+med-shared:eq: ==| ==|== ==|=== subset-big-unshared:eq: ==| ==| ==|== |
||
---|---|---|
.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.