Multiplication optimization

Steven D'Aprano steve at REMOVETHIScyber.com.au
Sat Feb 18 20:32:12 EST 2006


On Sat, 18 Feb 2006 16:48:38 -0800, Paul McGuire wrote:

> Does Python's run-time do any optimization of multiplication
> operations, like it does for boolean short-cutting?

Do you know that these shortcuts are optimizations, or are you just
assuming it takes less time to do the comparison than it would for the
CPU to blast bits around?

I have no idea whether your shortcuts are optimizations or pessimizations.
I'm just asking whether you know, or if you are making assumptions.


-- 
Steven.




More information about the Python-list mailing list