Remove redundant filter step in recompilation-candidate.
authorTony Garnock-Jones <tonygarnockjones@gmail.com>
Mon, 23 Jul 2018 22:15:24 +0100
changeset 420 a2e3a40b28fa
parent 419 26771937eee3
child 421 46b869aa09d1
Remove redundant filter step in recompilation-candidate.
experiments/little-smalltalk/jit-SmallWorld-2015.rkt
--- a/experiments/little-smalltalk/jit-SmallWorld-2015.rkt	Mon Jul 23 21:50:36 2018 +0100
+++ b/experiments/little-smalltalk/jit-SmallWorld-2015.rkt	Mon Jul 23 22:15:24 2018 +0100
@@ -518,12 +518,8 @@
                     "HAS SOME BLOCKS"
                     "no blocks")
                 (if stable? "stable" "not yet stable"))
-               (define (pic-entry-has-any-calls? entry)
-                 (define pic (cdr entry))
-                 (for/or [(i (in-range (pic-size pic)))] (positive? (pic@ pic i 2))))
-               (define used-pics (filter pic-entry-has-any-calls? pics))
                (define hotness
-                 (for/sum [(entry used-pics)]
+                 (for/sum [(entry pics)]
                    (match-define (cons pi pic) entry)
                    (for/sum [(i (in-range (pic-size pic)))]
                      (match (pic@ pic i 0)