Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In C# between >0 and >=1 which is faster and better? [closed]

Tags:

In C# between >0 and >=1 which is faster and better?

like image 311
Venkata Uma Lakkakula Avatar asked Sep 07 '10 18:09

Venkata Uma Lakkakula


People also ask

What is '~' in C programming?

In mathematics, the tilde often represents approximation, especially when used in duplicate, and is sometimes called the "equivalency sign." In regular expressions, the tilde is used as an operator in pattern matching, and in C programming, it is used as a bitwise operator representing a unary negation (i.e., "bitwise ...

What is operators in C?

Advertisements. An operator is a symbol that tells the compiler to perform specific mathematical or logical functions. C language is rich in built-in operators and provides the following types of operators − Arithmetic Operators.

What is the use of in C?

In C/C++, the # sign marks preprocessor directives. If you're not familiar with the preprocessor, it works as part of the compilation process, handling includes, macros, and more.


1 Answers

Neither; they both should compile down to the same thing if one is faster or better.

More importantly, most programmers will probably find > 0 more readable, and readability is more important than sub micro optimizations like this.

like image 59
Billy ONeal Avatar answered Oct 02 '22 17:10

Billy ONeal