(And I feel obliged here to suggest that there should be some way to
write test cases for this kind of thing -- ones that are not based on
timing things but ones that are based on feeding some expressions into
a compiler and making sure they get re-ordered in an expected way.)

Robby

On Thu, Oct 6, 2011 at 6:22 PM, Sam Tobin-Hochstadt <sa...@ccs.neu.edu> wrote:
>
> That certainly doesn't seem right.  It should prefer the pair check, but
> it's supposed to treat calling embedded expressions as slow.  I'll take a
> look at that.
>
> On Oct 6, 2011 7:13 PM, "Jay McCarthy" <jay.mccar...@gmail.com> wrote:
>>
>> Given all this talk of optimization, I'm still amazed that my original
>> example failed. Basically, the ordering optimization decided that
>>
>> (and (pair? (cdr e))
>>       (parse (car (cdr e))))
>>
>> is cheaper than
>>
>> (equal? '+ (car e))
>>
>> Jay
>>
>> --
>> Jay McCarthy <j...@cs.byu.edu>
>> Assistant Professor / Brigham Young University
>> http://faculty.cs.byu.edu/~jay
>>
>> "The glory of God is Intelligence" - D&C 93
>

_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Reply via email to