[racket-dev] [plt] Push #21079: master branch updated
Robby Findler wrote:
> On Mon, Sep 13, 2010 at 4:18 PM, <ryanc at racket-lang.org> wrote:
>> a3d1ff4 Ryan Culpepper <ryanc at racket-lang.org> 2010-09-09 17:29
>> :
>> | added contracts (->i) to racket/dict
>> :
>> M collects/racket/dict.rkt | 190 ++++++++++++++++++++++++++++++++---------
>> M collects/unstable/dirs.rkt | 13 ++--
>>
>
> Do you have a benchmark for splay trees or some app that uses them a
> lot that you can use to measure what kind of a performance hit you are
> taking from these contracts?
Not yet, but I should be able to adapt the test into a stress test.
Some hints for anyone else who'd like to try: There are two contract
boundaries involved in dictionaries now. There's a boundary between the
dictionary implementation and racket/dict, via prop:dict/contract and
struct-type-property/c. There'a also a boundary between racket/dict and
client modules. You can bypass the first boundary by using prop:dict
instead of prop:dict/contract. You can bypass the second one by
requiring dict-ref et al from racket/private/dict instead of racket/dict.
Ryan