This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Jim.Jewett, Jimbofbx, Ramchandra Apte, jcea, pitrou, python-dev, rhettinger, serhiy.storchaka, skrah
Date 2012-04-10.16:10:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1334074381.2496.19.camel@raxxla>
In-reply-to <1334070953.25.0.0683775652857.issue14478@psf.upfronthosting.co.za>
Content
> The patch for the Python version looks good to me

Oh, but used by James Hutchison approach is faster. When I disable the
_decimal:

Unpatched:
int:  2.24056077003479
CachingDecimal:  8.49468207359314
Decimal:  187.68132972717285

With rhettinger's LBYL patch:
int:  2.1670639514923096
CachingDecimal:  8.790924310684204
Decimal:  10.426796436309814

With EAFP patch:
int:  2.1392786502838135
CachingDecimal:  8.431122303009033
Decimal:  8.263015270233154
Files
File name Uploaded
decimal_hash_2.patch serhiy.storchaka, 2012-04-10.16:10:39
History
Date User Action Args
2012-04-10 16:10:40serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, jcea, pitrou, skrah, Jimbofbx, python-dev, Ramchandra Apte, Jim.Jewett
2012-04-10 16:10:39serhiy.storchakalinkissue14478 messages
2012-04-10 16:10:39serhiy.storchakacreate