[EMAIL PROTECTED] wrote:

> I don't know if C++ compilers can do such optimizations.

working on a Python to C/C++ translator without knowing what kind
of optimizations a C/C++ compiler can do for you sounds like a great
way to waste your time...

(I would be rather bit surprised if any contemporary C or C++ compiler
didn't generate optimal machine code for source code that contains swaps
like the one you posted.  it won't look at just the swap statement, however;
the interesting thing is where the values came from, and what you're doing
with the values later on. minimizing the number of assignment statements in
the swap translation won't change a thing...)

</F> 



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to