elide value cells for NLXs when it seems like the right thing
authorNikodemus Siivola <nikodemus@random-state.net>
Mon, 21 May 2012 20:30:54 +0000 (23:30 +0300)
committerNikodemus Siivola <nikodemus@random-state.net>
Sun, 27 May 2012 16:46:05 +0000 (19:46 +0300)
  Previously we only did this for unsafe code.

  Now we also elide them for

   (1) exits from DX functions: if a DX function escapes its proper context,
       trying to perform NLX to a stale tag is the least of our worries.

   (2) functions that cannot escape. Since the escape analysis isn't yet very
       tested, disable it for safe code, though. If this raises hairs on your
       neck, consider this: even if our analysis is wrong, and a function we
       didn't think could escape does, we're in the land of "undefined
       consequences" anyways.

       If you're wondering if this is worth it, compare

         (defun feh (x)
           (flet ((meh () (return-from feh 'meh)))
             (typecase x
              (cons (or (car x) (meh)))
              (t (meh)))))

         (time (loop repeat 10000 do (feh t)))

       with and without the escape analysis.


No differences found