racket/c
Matthew Flatt 3ba909f3c6 avoid quadratics in call-live information
Using a tree representation enables sharing to avoid a quadratic-sized
compiled form and intermediate quadtraic-time/space representations
for a program like this one, where there are N calls each with an
average of N/2 live variables:

 (define vars
   (let loop ([i 10000])
     (cond
      [(zero? i) '()]
      [else (cons (gensym) (loop (sub1 i)))])))

 (time
  (begin
   (compile
    `(lambda ,vars
       ,@(map (lambda (v) `(,v)) vars)))
   (void)))

Keeping the variables in tree form (since they're already collected
that way) and memoizing reduces on the tree allows sharing to be
constructed and preserved. The tree approach persists even to the
runtime mask for live variables.

original commit: 35942accb14d1226189605548a9e05ca95e3f0b6
2017-12-21 05:34:11 -07:00
..
alloc.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
arm32le.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
cs.ico initial upload of open-source release 2016-04-26 10:04:54 -04:00
expeditor.c - ifdef'd out include of xlocale.h for glibc, since the glibc 2017-10-13 16:59:16 -04:00
externs.h - renamed s_gettime => S_gettime to remain consistent with the 2017-10-11 16:35:24 -04:00
fasl.c add make-ephemeron-eq-hashtable, etc. 2017-07-06 16:27:23 -06:00
flushcache.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
foreign.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
gc-ocd.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
gc-oce.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
gc.c avoid quadratics in call-live information 2017-12-21 05:34:11 -07:00
gcwrapper.c check_dirty_ephemeron now puts ephemerons whose keys haven't yet 2017-05-29 20:21:01 -04:00
globals.h spelling 2017-12-04 09:35:31 +00:00
i3le.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
intern.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
io.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
itest.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
main.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Makefile.a6nt - updated version to 9.5.1 2017-10-11 19:57:53 -04:00
Makefile.i3nt - updated version to 9.5.1 2017-10-11 19:57:53 -04:00
Makefile.ta6nt - updated version to 9.5.1 2017-10-11 19:57:53 -04:00
Makefile.ti3nt - updated version to 9.5.1 2017-10-11 19:57:53 -04:00
Mf-a6fb Disable warning for implicit fallthrough 2017-06-13 20:53:18 -04:00
Mf-a6le Merge branch 'master' into no-implicit-fallthrough 2017-06-20 19:02:16 -04:00
Mf-a6nb Disable warning for implicit fallthrough 2017-06-13 20:53:18 -04:00
Mf-a6nt added support for Microsoft Visual Studio 2017 on Windows 2017-08-11 13:10:37 -04:00
Mf-a6ob Disable warning for implicit fallthrough 2017-06-13 20:53:18 -04:00
Mf-a6osx Disable warning for implicit fallthrough 2017-06-13 20:53:18 -04:00
Mf-a6s2 Disable warning for implicit fallthrough 2017-06-13 20:53:18 -04:00
Mf-arm32le Merge branch 'master' into no-implicit-fallthrough 2017-06-20 19:02:16 -04:00
Mf-base changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-i3fb Disable warning for implicit fallthrough 2017-06-13 20:53:18 -04:00
Mf-i3le Merge branch 'master' into no-implicit-fallthrough 2017-06-20 19:02:16 -04:00
Mf-i3nb Disable warning for implicit fallthrough 2017-06-13 20:53:18 -04:00
Mf-i3nt support Windows build on Bash/WSL 2017-05-02 08:25:09 -06:00
Mf-i3ob Disable warning for implicit fallthrough 2017-06-13 20:53:18 -04:00
Mf-i3osx Disable warning for implicit fallthrough 2017-06-13 20:53:18 -04:00
Mf-i3qnx changed copyright year to 2017 2017-04-06 11:41:33 -04:00
Mf-i3s2 Disable warning for implicit fallthrough 2017-06-13 20:53:18 -04:00
Mf-ppc32le Merge branch 'master' into no-implicit-fallthrough 2017-06-20 19:02:16 -04:00
Mf-ta6fb Disable warning for implicit fallthrough 2017-06-13 20:53:18 -04:00
Mf-ta6le Merge branch 'master' into no-implicit-fallthrough 2017-06-20 19:02:16 -04:00
Mf-ta6nb Disable warning for implicit fallthrough 2017-06-13 20:53:18 -04:00
Mf-ta6nt added support for Microsoft Visual Studio 2017 on Windows 2017-08-11 13:10:37 -04:00
Mf-ta6ob Disable warning for implicit fallthrough 2017-06-13 20:53:18 -04:00
Mf-ta6osx Disable warning for implicit fallthrough 2017-06-13 20:53:18 -04:00
Mf-ta6s2 Disable warning for implicit fallthrough 2017-06-13 20:53:18 -04:00
Mf-ti3fb Disable warning for implicit fallthrough 2017-06-13 20:53:18 -04:00
Mf-ti3le Merge branch 'master' into no-implicit-fallthrough 2017-06-20 19:02:16 -04:00
Mf-ti3nb Disable warning for implicit fallthrough 2017-06-13 20:53:18 -04:00
Mf-ti3nt support Windows build on Bash/WSL 2017-05-02 08:25:09 -06:00
Mf-ti3ob Disable warning for implicit fallthrough 2017-06-13 20:53:18 -04:00
Mf-ti3osx Disable warning for implicit fallthrough 2017-06-13 20:53:18 -04:00
Mf-ti3s2 Disable warning for implicit fallthrough 2017-06-13 20:53:18 -04:00
Mf-tppc32le Merge branch 'master' into no-implicit-fallthrough 2017-06-20 19:02:16 -04:00
new-io.c added casts to c/new-io.c to eliminate compiler warnings in Windows 2017-06-27 12:35:35 -04:00
number.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
ppc32.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
ppc32le.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
prim.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
prim5.c add bytevector-compress and bytevector-decompress 2017-06-21 17:52:28 -06:00
print.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
scheme.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
scheme.exe.manifest - Cygwin is now used on Windows, updated mats, eliminated unused killme 2016-06-10 10:07:07 -04:00
scheme.rc - updated version to 9.5.1 2017-10-11 19:57:53 -04:00
schlib.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
schsig.c fixed typo in S_abnormal_exit 2017-06-27 12:26:22 -04:00
segment.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
segment.h changed copyright year to 2017 2017-04-06 11:41:33 -04:00
sort.h changed copyright year to 2017 2017-04-06 11:41:33 -04:00
statics.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
stats.c - renamed s_gettime => S_gettime to remain consistent with the 2017-10-11 16:35:24 -04:00
symbol.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00
system.h changed copyright year to 2017 2017-04-06 11:41:33 -04:00
thread.c - renamed s_gettime => S_gettime to remain consistent with the 2017-10-11 16:35:24 -04:00
thread.h changed copyright year to 2017 2017-04-06 11:41:33 -04:00
types.h add ephemerons 2017-05-24 09:38:24 -06:00
version.h fixes wrong type for iconv 2017-06-02 16:18:04 +02:00
vs.bat Add support for building with Visual Studio BuildTools 2017-08-18 11:03:32 -04:00
windows.c changed copyright year to 2017 2017-04-06 11:41:33 -04:00