racket/pkgs/racket-test-core/tests/racket
Gustavo Massaccesi bfa269982f optimizer: don't move APPN_FLAG_OMITTABLE inside lambdas
Some expressions are omittable only when the arguments have certain types.
In this case the application is marked with APPN_FLAG_OMITTABLE instead of relaying on the flags of the primitive.

The optimizer can't use this flag to move the expression inside a lamba or across a potential continuation capture, unlike other omittable expressions. They can be moved
only in more restricted conditions.

For example, in this program

  #lang racket/base

  (define n 10000)
  (define m 10000)
  (time
   (define xs (build-list n (lambda (x) 0)))
   (length xs)
   (define ws (list->vector xs)) ; <-- omittable
   (for ([i (in-range m)])
     (vector-ref ws 0)))     ; <-- ws is used once

If the optimizer moves the expression in the definition of ws inside the recursive
lambda that is created by the for, then the code is equivalent to:

  #lang racket/base

  (define n 10000)
  (define m 10000)
  (time
   (define xs (build-list n (lambda (x) 0)))
   (length xs)
   (for ([i (in-range m)])
     (vector-ref (list->vector xs) 0)))     ; <-- moved here

And the new code is O(n*m) instead of O(n+m). This example is a minimized version
of the function kde from the plot package, where n=m and the bug changed the run
time from linear to quadratic.
2016-07-31 08:58:54 -03:00
..
lang Use racket instead of scheme. Fixes dependency issues. 2014-12-15 02:45:32 -05:00
.gitignore Ignore files here too. 2014-12-15 02:55:15 -05:00
all.rktl Move contents of unstable/hash to racket/hash. 2015-07-20 16:00:52 -05:00
async-channel.rktl
basic.rktl add hash-keys-subset? 2016-06-30 08:22:18 -06:00
boundmap-test.rktl switch to set-of-scopes expander 2015-07-16 14:20:00 -06:00
bytes.rktl
censor.rktl
chaperone.rktl Add procedure-impersonator*?. 2016-04-25 15:41:19 -05:00
cm.rktl add use-compiled-file-check 2016-07-26 10:27:08 -06:00
cmdline.rktl
collects.rktl
contmark.rktl Reduce and fix dependencies for "racket-core-test". 2014-12-15 19:07:43 -05:00
control.rktl
core-tests.rktl
cstruct.rktl require a #:offset keyword before a field offset in define-cstruct 2015-02-14 18:40:20 -07:00
date.rktl scalinger -> scaliger 2016-03-10 15:08:48 -06:00
deep.rktl
dict.rktl
expand.rktl
extflonum.rktl fix extflonum-printing test when extflonums are disabled 2015-02-17 19:12:29 -07:00
ffi-lock.rkt fix memory-management problem with #:lock-name 2015-06-26 07:44:43 +08:00
file.rktl make (system-type 'machine) not depend on the secutiry guard 2016-04-06 12:51:14 -06:00
filelib.rktl fix tests to avoid writing to the current or installation directory 2016-03-11 07:35:05 -07:00
fixnum.rktl avoid some C undefined behavior 2016-02-09 07:38:28 -07:00
flonum.rktl
for-submod.rkt
for-util.rkt
for.rktl fix syntax checking in for/vector 2016-04-16 09:48:08 -06:00
foreign-test.c saved-errno tests for windows 2016-02-26 17:57:56 -05:00
foreign-test.rktl Add a way to recognize cpointer predicates. (#1368) 2016-07-08 12:40:03 -04:00
function.rktl Generalize procedure-result-arity to work on reduced-arity procedures. 2016-03-07 16:25:13 -06:00
generator.rktl
has-submod.rkt
hash.rktl special cases for small hashes in unsafe_scheme_hash_tree_iterate_* 2016-02-28 15:34:16 -03:00
id-set-test.rktl add free-id sets 2015-05-04 19:05:07 -04:00
id-table-test.rktl Add more hash-like operations to id-table 2015-11-21 15:46:22 -05:00
info.rkt Increase timeout on core tests. 2015-07-21 15:40:09 -04:00
iostream.rktl
letrec.rktl
list.rktl fix (combinations n k) bug 2016-02-26 17:59:59 -05:00
loadable.rktl
loadtest.rktl
logger.rktl Move part of unstable/logging to racket/logging. 2015-07-23 12:22:51 -05:00
macro.rktl improve source location in internal-definition errors for syntax-case, 2016-04-26 16:09:30 -05:00
math.rktl Remove dependency on unstable/flonum. 2015-08-27 14:28:36 -05:00
moddep.rktl Add tests for resolve-module-path-* with optional argument 2016-05-23 20:48:59 -04:00
modprot.rktl print a little more in a test suite 2016-06-22 14:18:54 -06:00
module-reader.rktl
module.rktl make variable-reference->namespace enable top-level mode 2016-07-14 15:10:05 -06:00
name.rktl Generalize inferred names 2015-10-05 10:25:57 -06:00
namespac.rktl adjust top-level handling for identifiers without #%top 2015-09-06 08:06:07 -06:00
net-available.rkt
number.rktl work around modulo failure on 64-bit Windows with MSVC 2008 2016-03-30 09:14:55 -06:00
numstrs.rktl fix too-early exact->inexact conversion in number parsing 2015-11-22 09:11:23 -07:00
object.rktl add internal-definition-context-{binding-identifier,track} 2015-11-15 06:17:22 -07:00
optimize.rktl optimizer: don't move APPN_FLAG_OMITTABLE inside lambdas 2016-07-31 08:58:54 -03:00
pack.rktl
parallel.rktl
param.rktl
path.rktl add path-extension, path-has-extension? and path-{add,replace}-extension 2016-04-16 17:56:34 -06:00
pathlib.rktl rename relectly added path-extension to path-get-extension 2016-04-24 20:30:51 -06:00
phantom-bytes.rkt incremental GC: fix phantom-byte counting 2015-12-01 05:50:06 -07:00
place-utils.rkt Bind channel properly in place/context. 2015-12-17 19:17:28 -05:00
place.rktl Bind channel properly in place/context. 2015-12-17 19:17:28 -05:00
port.rktl fix tests to avoid writing to the current or installation directory 2016-03-11 07:35:05 -07:00
portlib.rktl
pp-regression.rktd
pretty.rktl Add a mode argument to pretty-format. 2015-09-07 15:46:58 -05:00
print.rktl fix mcons handling by built-in printer in expression mode 2016-06-11 06:53:31 -06:00
procs.rktl
prompt-tests.rktl
prompt.rktl fix related to continuations 2016-04-04 11:19:53 -06:00
quiet.rktl
read.rktl fix reader tests for disable extflonums 2015-11-04 19:54:27 -07:00
readtable.rktl Adjust use of readtable argument in read/recursive 2015-04-15 13:01:58 -06:00
resource.rktl
rx.rktl adjustments for regexp failure handler 2016-04-08 18:34:51 -06:00
sandbox.rktl Avoid intermittent timeout with longer time limit. 2016-03-01 18:52:46 -05:00
scheme-tests.rktl
sequence.rktl Revert adding in-pairs to racket/sequence. 2015-08-13 14:43:57 -05:00
serialize.rktl fix serializer for cycles containing immutable structs 2016-05-16 18:06:18 -06:00
set.rktl Fix set chaperone tests. 2016-01-04 11:08:02 -05:00
setup.rktl
shared-tests.rktl
shared.rktl Finish fixing dependencies of "racket-test-core". 2014-12-19 11:35:39 -05:00
srcloc.rktl
stream.rktl Add for/stream and for*/stream comprehensions to racket/stream 2016-01-21 20:18:39 -06:00
string.rktl Add string-contains?. 2015-09-16 13:05:41 -05:00
struct.rktl add inspector-superior? 2016-06-17 10:23:47 -06:00
stx.rktl Fix nested quasisyntax infinite looping 2016-05-02 15:15:47 -04:00
stxparam.rktl Fix issue 1329 2016-05-23 20:32:37 -04:00
submodule.rktl switch to set-of-scopes expander 2015-07-16 14:20:00 -06:00
subprocess.rktl
sync.rktl make alarm-evt tests more likely to pass 2016-02-07 13:34:47 -07:00
syntax.rktl fix begin-for-syntax under splicing-let 2016-05-16 13:07:44 -06:00
syntaxlibs.rktl
test.rkt
testing.rktl add unsafe-hash-iterate ops; add specific hash table sequences 2016-02-05 14:30:34 -05:00
thread.rktl
thrport.rktl
trace.rktl Tests for correct syntax location 2016-07-19 12:24:26 -05:00
trait.rktl
udp.rktl
uni-norm.rktl Unicode 7.0 2015-02-09 11:33:13 -07:00
unicode.rktl Unicode 7.0 2015-02-09 11:33:13 -07:00
unsafe.rktl fix unsafe-immutable-hash-... on hash table from read 2016-07-15 06:23:20 -06:00
vector.rktl Move tests for SRFIs to "racket-test". 2014-12-18 15:23:44 -05:00
version.rktl Add test for "base" version. 2015-03-20 11:56:05 -04:00
will.rktl fix space-safety annotation for nested ifs 2015-11-08 07:36:48 -07:00