Elmi Ahmadov
Elmi Ahmadov

Reputation: 1035

which one is fast?

I tried these operations:

(7 xor 5) and (7 - 5)

and I get same answers. I want to know which operation is fast? Can anyone explain to me?

Upvotes: 0

Views: 47

Answers (1)

SLaks
SLaks

Reputation: 887469

Both.

You should write code that clearly expresses the operation you're trying to perform.

The compiler / JITter will take care of making it fast.

Upvotes: 2

Related Questions