The Racket repository
![]() Mutable `eq?`- and `eqv?`-based hash tables were formerly guarded by a lock that made them safe for Scheme threads (i.e., OS-level threads). In particular, that futures could concurrently access hash tables. But the cost of that lock appears to be too high for such a rarely-used capability. Switching `eq?`- and `eqv?`-based hash tables so that they're safe only for Racket threads means that the lock on a hash table can be much cheaper. A lock is still needed to because the Rumble layer adds extra fields for iteration. In the specific case of `hash-ref` on `eq?`-based tables, however, the lock can be ignored, which makes one of the most common `hash-ref`s much faster. Overall, `hash-ref` on a mutable `eq?`-based hash table is now 4-5 times as fast, which makes it about twice as fast as traditional Racket's `hash-ref`. A `hash-set!` operation is about twice as fast as before, which puts it on par with traditional Rackets `hash-set!`. The `hash-ref` improvement makes `send` about twice as fast as before in Racket CS, making it a little faster than traditional Racket. Since futures can no longer concurrently access `eq?`- and `eqv?`-based hash tables, they have to synchronize with the main thread for access. Racket CS had avoided the "sync" action on futures that traditional Racket sometimes uses, but this change introduces sync actions to Racket CS, since it's appropriate for accessing mutable `eq?`- and `eqv?`-based hash tables. |
||
---|---|---|
.github | ||
.gitlab | ||
pkgs | ||
racket | ||
.gitattributes | ||
.gitignore | ||
.gitlab-ci.yml | ||
.mailmap | ||
.travis.yml | ||
appveyor.yml | ||
azure-pipelines.yml | ||
CONTRIBUTING.md | ||
INSTALL.txt | ||
LICENSE-APACHE.txt | ||
LICENSE-MIT.txt | ||
LICENSE.txt | ||
Makefile | ||
README.md |
This is the source code for the core of Racket. See "INSTALL.txt" for full information on building Racket.
To build the full Racket distribution from this repository, run make
in the top-level directory. To build minimal Racket, run make base
.
The rest of the Racket distribution source code is in other repositories, mostly under the Racket GitHub organization.
Contribute to Racket by submitting a pull request, joining the development mailing list, or visiting the IRC or Slack channels.
Racket is free software; see "COPYRIGHT" and "CONTRIBUTING.md" for more details.