Message81734
> > - avoids comparing an unsigned long to -1
Just out of interest, why? The cast is unnecessary: there's no ambiguity
or undefinedness (the int -1 gets promoted to unsigned long, with
wraparound semantics), and neither gcc nor MSVC complains.
Other than that, the patch looks fine to me; x ^= x >> 4 would be fine
too. I really don't see that it makes much difference either way, since
both transformations are reversible and fast enough. |
|
Date |
User |
Action |
Args |
2009-02-12 08:57:27 | mark.dickinson | set | recipients:
+ mark.dickinson, rhettinger, jcea, chemacortes, Rhamphoryncus, pitrou, LambertDW |
2009-02-12 08:57:26 | mark.dickinson | set | messageid: <1234429046.69.0.362401801997.issue5186@psf.upfronthosting.co.za> |
2009-02-12 08:57:25 | mark.dickinson | link | issue5186 messages |
2009-02-12 08:57:24 | mark.dickinson | create | |
|