python philosophical question - strong vs duck typing
David Harks
dave at dwink.net
Tue Jan 3 14:03:37 EST 2012
On 1/3/2012 12:13 PM, Sean Wolfe wrote:
> if we are coding in python but looking for
> more performance,
Are you in fact in this situation? Despite years of folks mentioning how
Python is 'slower than C++', I've seen a project where a developer
churned out a feature using Python's generators that performed much
faster than the C++ implementation it replaced. It wasn't because the
C++ was slower by nature; it's because it was harder to express the
optimal algorithm in C++ so the C++ developer chose a sub-optimal
approach in the interest of meeting a deadline.
There's always a tradeoff. Making a language less expressive
(constraining ourselves) in favor of runtime performance is not always
the right tradeoff.
More information about the Python-list
mailing list