The Racket repository
Go to file
Matthew Flatt 41623f3027 Chez Scheme: move write-barrier fixnum guard outside write fence
On an Apple M1, an example like

      (let ([v (make-vector 1000000)])
        (for* ([_ (in-range 100)]
               [i (in-range 1000000)])
          (vector-set! v i (+ 1 i))))

would generate tightly interleaved fence and store operations, which
seems to make the processor unhappy so that the code run 40x slower
than it should.

A key part of the example is that `(+ 1 i)` defeats cp0-level
inference that the result will be a fixnum. A dynamic fixnum test
avoids adding the update to a remembered set as part of the write
barrier, but the memory fence needed for ARM must be before the store,
while the fixnum test was after the store. This change bundles the
write fence and remember-set update under a `fixnum?` guard, so they
happen to gether or not at all --- at the small cost of generating the
store instruction(s) in two branches. In the example above, neither
the fence nor remember-set update happen, but changing `(+ 1 i)` to
`(quote x)` triggers both, and performance is still ok.
2021-02-03 10:30:24 -07:00
.github ci: build CS for iOS during PR CI 2021-01-19 07:08:27 -05:00
pkgs fix continuation-marks on thread without prompt 2021-02-03 07:14:07 -07:00
racket Chez Scheme: move write-barrier fixnum guard outside write fence 2021-02-03 10:30:24 -07:00
.gitattributes Don't include git files in archives. 2010-05-12 01:46:05 -04:00
.gitignore Fix typo. 2019-06-21 12:32:37 -05:00
.lgtm.yml Fetch PB to start LGTM build 2020-08-07 12:17:17 +02:00
.mailmap Minor metadata changes. 2019-10-15 08:09:32 -04:00
.makefile makefile: make just nmake make 2021-02-01 09:05:56 -07:00
build.md build-instruction typos and clarifications 2020-12-27 19:08:19 -07:00
LICENSE update LICENSE to use "CS" and "BC" 2021-01-15 09:32:59 -07:00
Makefile makefile: make just nmake make 2021-02-01 09:05:56 -07:00
README.md Fix README 2020-09-06 09:03:42 -04:00

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

https://docs.racket-lang.org

Building from Source

For information on building Racket from this repository, see the Build Guide.

Contributing

Contribute to Racket by submitting a pull request, 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 LGPLv3, Apache 2.0, and MIT licenses. Those licenses are available in this repository in the files racket/src/LICENSE-LGPL.txt, racket/src/LICENSE-APACHE.txt, and racket/src/LICENSE-MIT.txt.

See the Racket Build Guide for more guidance on contributing.

The Friendly Environment Policy contains guidelines on expected behavior within the Racket community.

License

Racket is free software; see LICENSE for more details.