News for hackers. Stuff that matters.
Re:Why Python is Slow: Looking Under the Hood by ForHackernews on Friday May 09, 2014 @04:15PM (#7723033)
Python statically allocates small integers (-5 to 256), so you're not actually creating a new object unless you're creating one outside that range.

http://www.laurentluce.com/posts/python-integer-objects-impl...

Re:Why Python is Slow: Looking Under the Hood by theseoafs on Saturday May 10, 2014 @01:42AM (#7724631)
Dynamic allocation isn't the only cost there -- a cost that's just as big when you're doing number crunching in Python is cache efficiency. If every number is on the heap, and every number in Python is ~20 bytes long, you're going to have caching problems, even if your numbers only ever range from -5 to 256.