Re:The Performance Impact of Using dict() Instead of {} in C...
by andreasvc on Wednesday November 14, 2012 @05:50AM
(#4782847)
While it's nice to get a peek at the implementation details of CPython in this way, I doubt that dict(foo=bar, ...) is typically going to be part of a critical inner loop. It's much more likely to be executed just once before a loop, making this finding irrelevant for real optimization problems.
[ Parent
| on HN ]
Re:The Performance Impact of Using dict() Instead of {} in C...
by haeric on Wednesday November 14, 2012 @08:46AM
(#4783248)
What are you using Python for? There are plenty of occations where I have made lists of dictionaries, e.g. when I have have large amounts of data that have to be outputted in a certain way, or if it's just logical to store dictionaries instead of instances of some custom class. No performance critical stuff though, and I've almost never used dict(), but still, calling this irrelevant for optimization is a bit harsh...