<HTML><BODY>Strange.<br><br><p>#lang racket<br>(define (test1 x y)<br>  (if x<br>    (+ y 1)<br>    (- y 1)))</p><p>(define (test2 x)<br>  (if x<br>    (λ (y) (+ y 1))<br>    (λ (y) (- y 1))))</p><p>(define (run1 data)<br>  (map (λ (x) (test1 #t x)) data))</p><p>(define (run2 data)<br>  (map (λ (x) ((test2 #t) x)) data))</p>I expect, that run2 should be faster, because (test2 #t) returns const (lambda (y) (+ y 1)) and shouldn't be checked on every iteration.<br><br>But in reality (time ...) gives 219 for run1 and 212 for run2. run2 is 1.5 times slower!<br><br>Why so?<br><br><br>-- <br>Roman Klochkov</BODY></HTML>