HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
Posts: 182
Joined: Fri Apr 27, 2012 9:44 pm
Location: Araruama-RJ, Brazil

Re: MsgInfoEx

Post by Amarante »

Pablo César wrote:
Amarante wrote:Frankly I could not see a significant difference and personally I like the "IF" structure in place of "CASE".
I think it is more a matter of taste since no significant change at runtime, but please me know if I'm wrong.
Hi Amarante,

I also agree in parts with you. I have read this:
Is “elseif” faster than “switch() case” ?

Why do you care?

99.99% of the time, you shouldn't care.

These sorts of micro-optimizations are unlikely to affect the performance of your code.

Also, if you NEEDED to care, then you should be doing performance profiling on your code. In which case finding out the performance difference between a switch case and an if-else block would be trivial
I agree with just for the appearance which Do Case seems more clear IMHO, that is important. Micro-seconds of performance is not going to affect your system anyway. The important is the code to be more clear as posible for now and for the future interpretation, being by me or others.

Also I believe when many IFs are defined, many duplicated conditions could be attended at same time. So, IMHO Do Case I use when I just want only one choice.

This is my point-of-view. I hope to be helpfully to form a good own review.
Oi Pablo, obrigado por compreender minha opnião. Dentro deste post há um comentário sobre uma aplicação sua chamada STRU, só que eu não a localizei. Poderia dispnibiliza-la ou indicar onde está?
Desde já agradeço pela consideração.

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 182 times

Post by Pablo César »

Oi Amarante,

Sem problemas, estava logo no final do tópico: viewtopic.php?p=27351#p27351. Só que no é a ultima versão, isso porque parei com a instenção de utilizar um ContextMenu com sub-menu no Windows Explorer. Mas possui vários bons exemplos, espero que seja de utilidade. :D
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

Post Reply