The Racket repository
Go to file
Robby Findler 7728e062f4 adjust recursive-contract so that it terminates on cyclic values
closes PR 14559

This slows down tight recursive contract loops by about 10%, using
the code below as the micro-benchmark:

(require racket/contract/base)

(define c
  (recursive-contract
   (or/c #f (cons/c c c))
   #:flat))

(define n1
  (let loop ([i 500000])
    (cond
      [(zero? i) #f]
      [else (cons (loop (- i 1)) #f)])))

(define n2
  (let loop ([i 500000])
    (cond
      [(zero? i) n1]
      [else (cons (loop (- i 1)) #f)])))

(collect-garbage) (collect-garbage) (collect-garbage)

(void
 (time (contract c n1 'pos 'neg))
 (time (contract c n2 'pos 'neg)))

(cdr n1)
(cdr n2)
2014-06-12 07:55:39 -05:00
native-pkgs@8988164a6e win64: fix longdouble DLL 2014-04-27 16:51:23 -06:00
pkgs adjust recursive-contract so that it terminates on cyclic values 2014-06-12 07:55:39 -05:00
racket adjust recursive-contract so that it terminates on cyclic values 2014-06-12 07:55:39 -05:00
.gitattributes Don't include git files in archives. 2010-05-12 01:46:05 -04:00
.gitignore Add add-on to .gitignore. 2013-07-04 11:51:53 -04:00
.gitmodules access "native-pkgs" as a git submodule 2013-07-26 22:36:20 -06:00
.mailmap mailmap updates & fixes. 2013-04-03 18:10:22 -04:00
.travis.yml Enable OS X testing on Travis. 2014-05-14 11:00:24 -04:00
INSTALL.txt add unix-style makefile target 2014-05-20 09:01:40 +01:00
Makefile Makefile: add IF EXISTS guard on del for a Win32 target 2014-05-22 17:52:51 +01:00
README.txt 2013 -> 2014 2014-01-21 15:02:21 -05:00

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

License
-------

Racket
Copyright (c) 2010-2014 PLT Design Inc.

Racket is distributed under the GNU Lesser General Public License
(LGPL).  This means that you can 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 means
that you must release the source code for the modified software.  See
racket/src/COPYING_LESSER.txt for more information.