python philosophical question - strong vs duck typing

Evan Driscoll edriscoll at wisc.edu
Tue Jan 3 14:51:27 EST 2012


On 1/3/2012 13:13, Sean Wolfe wrote:
> What I am driving at is, if we are coding in python but looking for
> more performance, what if we had an option to 1) restrict ourselves
> somewhat by using strong typing to 2) make it easy to compile or
> convert down to C++ and thereby gain more performance.
I'm not sure it helps with compiling to C or C++ (that is neither
necessary nor sufficient for being a high performance language), but it
has the potential for helping quite a lot with performance. If you read
stuff written by evangelical Common Lisp folks, they tout CL's optional
type annotations as providing a mechanism for getting near-C-like
performance. I haven't tested that myself though.

Evan


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 552 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20120103/7e2a8b8d/attachment-0001.sig>


More information about the Python-list mailing list