The Racket repository
Go to file
Robby Findler c24ddb4a7c improve the way plus-one arity functions fall back when they can't see the application site
In particular, instead of going directly back to the chaperone, handle
the case where the function doesn't accept keyword arguments with a
less expensive fallback.

The less expensive fallback uses a case-lambda wrapper (wrapped inside
a make-keyword-procedure) to close over the neg-party and avoid the
chaperone creation. With this commit, the program below gets about 3x
faster, and is only about 20% slower than the version that replaces
the "(let ([f f]) ...)" with its body

  #lang racket/base
  (module m racket/base
    (require racket/contract/base)
    (provide (contract-out [f (-> integer? integer?)]))
    (define (f x) x))
  (require 'm)
  (collect-garbage)
  (time (for ([x (in-range 5000000)]) (let ([f f]) (f 1))))

  Thanks, @samth!
2016-01-07 12:59:21 -06:00
pkgs improve the way plus-one arity functions fall back when they can't see the application site 2016-01-07 12:59:21 -06:00
racket improve the way plus-one arity functions fall back when they can't see the application site 2016-01-07 12:59:21 -06:00
.gitattributes Don't include git files in archives. 2010-05-12 01:46:05 -04:00
.gitignore Add *.orig, *.rej and *.core files to gitignore. 2015-11-06 10:25:13 -06:00
.mailmap mailmap updates & fixes. 2013-04-03 18:10:22 -04:00
.travis.yml Fix CI tests for match test move. 2015-12-30 10:39:45 -05:00
appveyor.yml Fix CI tests for match test move. 2015-12-30 10:39:45 -05:00
INSTALL.txt note on catalogs and building from a tag 2015-09-19 09:40:43 -06:00
Makefile Windows cross-build: fix over-agressive pruning of DLLs 2015-10-21 18:13:39 -06:00
README.txt adjust copyright dates: 2014 -> 2015 2015-10-05 13:39:11 -06:00

This is the source code for the main Racket distribution.  See
"INSTALL.txt" for information on building Racket.

License
-------

Racket
Copyright (c) 2010-2015 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.