pingus-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: General Windows Cleanups


From: Neil Hotmail
Subject: Re: General Windows Cleanups
Date: Sat, 12 Oct 2002 19:41:35 +0100

On Saturday 12 October 2002 19:57, Neil Hotmail wrote:
> It gives a performance warning on the conversion, if you want I can add a
> directive to ignore the performance warning.
| I wonder why it does this. If VC++ believes that the performance of the
| variant bool = int != 0 is higher then bool = int why doesn't it simply
| transform the code in this way? It's allowed to do this since assignment
| from bool to int will never get anything else then 0 or 1.
| I'd prefer to add a directive to pingus.hxx since I consider the int != 0
| variant ugly. It's even a rule not to compare to 0 (in an if clause) since
| this is needlessly more complex. :-)
I agree, I think it is merely pointing out that int->bool isn't very
efficient, and if you can find a better way then do so, you can still do a
direct int->bool conversion, and I imagine that silently subsititues != 0
in, which is fairly slow, hence the performance warning. The reason is
probably the lack of a direct instruction to do this in x86 assembler, and
the loss is performance caused by it.

I'll look into putting a directive in.

> | PS: Never forget, VC++ is the buggiest of the popular C++ compilers. :-)
> And has the best debugger anywhere.
| I didn't use the VC++ debugger yet - did you use various gdb frontends?
wdb and dde, wdb was quite nice, but neither offer the complete integration
that you get by combining the IDE with the debugger. VC is seamless, and
takes no configuration to get the debugger and the program communicating, it
is just a "press run", "press pause" type affair.
Also wdb and dde are not windows programs, and my current machine is windows
only.

Ginge





reply via email to

[Prev in Thread] Current Thread [Next in Thread]