[racket] typed racket slow?

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Wed May 8 11:26:51 EDT 2013

I have a fast SSD, so that might be the difference.

Sam

On Wed, May 8, 2013 at 11:05 AM, Ray Racine <ray.racine at gmail.com> wrote:
> Oddly
>
> ray at rpr:~$ time racket r.rkt
>
> real    0m0.052s
> user    0m0.040s
> sys    0m0.012s
>
> ray at rpr:~$ time racket tr.rkt
>
> real    0m0.958s
> user    0m0.876s
> sys    0m0.080s
>
>
>
> On Wed, May 8, 2013 at 10:35 AM, Sam Tobin-Hochstadt <samth at ccs.neu.edu>
> wrote:
>>
>> On Wed, May 8, 2013 at 6:19 AM, Carl Eastlund <cce at ccs.neu.edu> wrote:
>> >
>> > I see just under 5 seconds for test.rkt and just over 5 seconds for
>> > utest.rkt.  So there's a fraction of a second extra startup time for
>> > Typed
>> > Racket, but it takes less time for each subsequent computation, so the
>> > difference depends on how much "real" work you do after startup.  I
>> > don't
>> > know what causes that startup cost, but hopefully this kind of benchmark
>> > will be useful to the Typed Racket maintainers in closing the gap for
>> > future
>> > versions.  So, thanks for the example, Manfred!
>>
>> This is all true, and you can see it in simpler examples.  The empty
>> modules:
>>
>> #lang typed/racket/base
>>
>> and
>>
>> #lang racket/base
>>
>> have the following timings:
>>
>> [samth at hermes:~/tmp plt] time racket test.rkt
>>
>> real    0m0.592s
>> user    0m0.516s
>> sys    0m0.064s
>> [samth at hermes:~/tmp plt] time racket test2.rkt
>>
>> real    0m0.065s
>> user    0m0.040s
>> sys    0m0.024s
>>
>> So you can see about 500 ms of extra overhead. Most of this time is in
>> loading and executing the runtime dependencies of Typed Racket, which
>> aren't used here, but which the implementation architecture of Typed
>> Racket makes it basically impossible to reduce.  We've worked hard to
>> reduce this cost, but it's hard to go much further.
>>
>> Sam
>> ____________________
>>   Racket Users list:
>>   http://lists.racket-lang.org/users
>
>

Posted on the users mailing list.