[racket] FW: q about code for partitions

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sun Jun 29 08:33:36 EDT 2014

This seems like a good test case for Vincent's tools. They may have
been able to tell us that the time was spent contract checking.

Robby


On Sun, Jun 29, 2014 at 5:48 AM, Jens Axel Søgaard
<jensaxel at soegaard.net> wrote:
> I have made a new vector version using zero? instead of exact-zero?.
>
> To give users a chance to remove the cache after doing partitions calculations,
> I have added set-partitions-cache.
>
>    Code:
>    https://github.com/soegaard/racket/blob/patch-14/pkgs/math-pkgs/math-lib/math/private/number-theory/partitions.rkt
>
>    Discussion:
>     https://github.com/plt/racket/pull/697
>
> /Jens Axel
>
>
> 2014-06-29 12:44 GMT+02:00 Jens Axel Søgaard <jensaxel at soegaard.net>:
>> 2014-06-29 8:47 GMT+02:00 Matthew Flatt <mflatt at cs.utah.edu>:
>>> It looks like "partitions2.rkt" ends up calling a contract-wrapped
>>> variant of `exact-zero?`.
>>
>> That explains why Eric saw an improvement, when the used #f instead of
>> 0 as the not-cached-yet value.
>>
>> /Jens Axel
>
>
>
> --
> --
> Jens Axel Søgaard
>
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users


Posted on the users mailing list.