hash and equal problem

nicolas cellier ncellier at ifrance.com
Tue Mar 28 10:29:32 UTC 2006


So i think i should proceed with VW latter solution:

Rationale:

Turning Float hash to Fraction hash really spoils things (factor 100) :

Time millisecondsToRun: [10000 timesRepeat: [Float pi asFraction hash]].
    1217
Time millisecondsToRun: [10000 timesRepeat: [Float pi hash]].
    13

But turning Fraction hash to Float hash does harm less (factor 10):
| tmp |

tmp := Float pi asFraction.
Array
    with: (Time millisecondsToRun: [10000 timesRepeat: [tmp hash]])
    with: (Time millisecondsToRun: [10000 timesRepeat: [tmp asFloat hash]])
  #(47 339)

This first naive implementation does not handle large fractions well (all
 have same Float infinity hash), but this can be fixed later (since they do
 not equal... but wait, wait, they equal ! arghh see another bug in next
 mail).

Nicolas

Le Mardi 28 Mars 2006 10:51, vous avez écrit :
> Nicolas
>
> thanks!
> My question was also more interested :)
> If you want to see this bug to be fixed, submit a fix and a bunch of
> tests :).
> You look like that right guy to do that :)
>
> Stef




More information about the Squeak-dev mailing list