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 kristjan.jonsson
Recipients kristjan.jonsson, mark.dickinson, michael.foord, pitrou, serhiy.storchaka
Date 2012-03-22.15:07:44
SpamBayes Score 2.8680225e-11
Marked as misclassified No
Message-id <1332428865.34.0.316494979692.issue14381@psf.upfronthosting.co.za>
In-reply-to
Content
The -10..11 range was determined empirically.  As you see from the values,  only -10 shows up as significant... In fact, just storing 0 to 5 would capture the bulk of the savings.
 
Right, I'll do some test with the hardcoded values you mentioned.
Btw, I don't think -0.0 is worth it, that value is a typical arithmetic result and not something you typically get from input data.

Also, while interning in python is certainly possible, perhaps it would make sense to implement such in c.  Perhaps in the math module, or perhaps  even the 'intern' builtin can be extended for this purpose?  It could be documented to intern any immutable object that it sees fit to intern, leaving the details to the implementation.
History
Date User Action Args
2012-03-22 15:07:45kristjan.jonssonsetrecipients: + kristjan.jonsson, mark.dickinson, pitrou, michael.foord, serhiy.storchaka
2012-03-22 15:07:45kristjan.jonssonsetmessageid: <1332428865.34.0.316494979692.issue14381@psf.upfronthosting.co.za>
2012-03-22 15:07:44kristjan.jonssonlinkissue14381 messages
2012-03-22 15:07:44kristjan.jonssoncreate