Re: [racket-users] Re: Time of hash-ref when the key is (not) found

2016-08-12 Thread Gustavo Massaccesi
Ok. To reproduce the results I have to use: (define char (integer->char 37932)) Thank to both. Gustavo On Fri, Aug 12, 2016 at 7:08 PM, Matthew Flatt wrote: > That still seems consistent with Alex's explanation. To test Alex's > explanation, I think you need a hash table

Re: [racket-users] Re: Time of hash-ref when the key is (not) found

2016-08-12 Thread Matthew Flatt
That still seems consistent with Alex's explanation. To test Alex's explanation, I think you need a hash table with a key whose hash code matches the one for the value you check, but where the key is not equal that value. Here's a variant of your code with a `bignum` and `char` that have the same

Re: [racket-users] Re: Time of hash-ref when the key is (not) found

2016-08-12 Thread Gustavo Massaccesi
I think it's something more subtle. With this definitions: (define long-assoc (for/list ([i (in-range 64 (+ 64 1024))]) (cons i #t))) (define hash0 (make-immutable-hash (cons '(0 . #t) long-assoc))) (define hash1 (make-immutable-hash (cons '(1 . #t) long-assoc))) With 5