I have a program in C, that uses lots of mathematical calculations, At some places during calculation the expression has many redundant parenthesis and braces
eg: ((x*y)+(((z*c))))
Does It degrade the performance ? Should we avoid it?
No, this shouldn't affect execution time since the expression will be simplified by the compiler.
It might have a minute effect on compilation time but note that word "minute" - it's doubtful you'd even notice.
Far more of an effect would be any developer reading that code. The superfluous parentheses may make it harder to understand or it may delay them a little while they curse the coder that inflicted such rubbish on them :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With