On Mar 22, 3:31 am, Bryan Olson <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > John Machin wrote: > >> On Mar 22, 1:11 am, [EMAIL PROTECTED] wrote: > >>> A collision sequence is not so rare. > >>>>>> [ hash( 2**i ) for i in range( 0, 256, 32 ) ] > >>> [1, 1, 1, 1, 1, 1, 1, 1] > >> Bryan did qualify his remarks: "If we exclude the case where an > >> adversary is choosing the keys, ..." > > > Some adversary. What, you mean, my boss or my customers? > > We mean that the party supplying the keys deliberately chose > them to make the hash table inefficient. In this thread the goal > is efficiency; a party working toward an opposing goal is an > adversary. > > If you find real-world data sets that tend to induce bad-case > behavior in Python's hash, please do tell. It would be reason > enough to adjust the hash function. The hashes in popular > software such as Python are already quite well vetted. > > Even a hash function that behaves as a random oracle has > worst-case quadratic-time in the algorithm here, but that's > an issue in theory and not in serving customers.
Hey Net: Where -we- left off, all real-world data sets were equally common, unless you think in peckbird bartenders. Nuh uh at all, unless you've got a characterize real-world data project underway. Did you know letter frequency distributions vary by domain? And now for the 2- squarebar spider. raise ISay( "Python Science is unusually prone against non-power multiples of 32 hashing integers", "Unknown value of I" ) parse( 'strangers are perfect' ) parse( 'i think i know someone' ) prevention.value() == 12* cure.value() raise SolveFor (raise CureValueSterling) keep: time.value().encode() > money.value() assert time.value().encode()== time.encode().value() perch( Out ) compose( Fluctuate ) compose( Punctuate ) compose( Explain ) @partial( partial, prefix ) (ha, h) raise Distracts( 'Well, would you look at that?' ) raise LivingConstraint( NoseFalls ) raise Superlative voice Absolute raise NonScalar( "Fit: It's apples -over- oranges." ) raise OverPull( "Not on Google." ) raise Drop( "It." ) moment+= instant raise LeavesImpression raise GoodMuleTwoHaystacks raise ScaleDecomposition raise Bias( 'Discrimination' ) raise BadFor raise RequestedControlCurrencyExpiration raise InsufficientTrust raise Shock raise EnoughTheory raise EnoughCustomers raise EyebrowTwo raise DataKill raise Reckless raise ThenWhat( AfterYou ) raise NotImplemented( 'Offer.refuse' ) raise LaughterUnacceptable raise Hell raise DesignUnintelligent raise HashesPerturbation raise ProfessionException yield Tick yield Tally yield Ho yield Gee yield Whoa raise ActuallyActuallyActually raise CurrencyAStream If you can't fit an analogy... Bee Dance : Hive Good :: Human This :: Community Good? What and how is it when to who where? What does it know? What does it do but sleep? Does it specialize, momentarily fair? Hey, what do you think of the spelling of this? "The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet." What do you think of the wording of "spelling"? Take me to your lexicographer: wake-up; you're up web, Europe web. Pass self to a generator. Dust is sett'ling; Tables turn: Water's drying; Sugars burn. Phaser fire! Shoulders square! join( TenForward )? Who is where? Mushroom's growing; Mighty... falls. Cauldron's bubbling; That is all. >>> def f(): ... n= True ... while 1: ... k= yield( n ) ... if k is not None: n= k ... >>> a= f() >>> next( a ) True >>> next( a ) True >>> next( a ) True >>> a.send( 2 ) 2 >>> next( a ) 2 >>> next( a ) 2 >>> next( a ) 2 >>> -- http://mail.python.org/mailman/listinfo/python-list