Hot answers tagged

11 votes
Accepted

Is there any performance penalty to unsigned integer underflow?

You didn't specify the processor or the compiler you are using. On any of the x86 family and any compiler I'm aware of, the answer would be that overflow has no impact on performance whatsoever. This ...
MadMan's user avatar
  • 743
7 votes

Is there any performance penalty to unsigned integer underflow?

No performance penalty Generally the overflow / underflow (carry flag) is automatically set and does not have a performance penalty. Avoid branching code You suggest "having an if statement to ...
Blindman67's user avatar
3 votes

Is there any performance penalty to unsigned integer underflow?

Unsigned integer overflow (and underflow) shouldn't have any noticeable impact on performance. On top of that, based on Wikipedia - Integer Overflow, unsigned integer overflow is defined to wrap ...
Tom Tsagkatos's user avatar
2 votes

Is it possible to use the Unreal Engine as a big C++ library, without using the editor?

Starting a rough answer for this old question as I learn more about this functionality myself, yes it seems this functionality has been available since at least Unreal Engine 4.27. However, it's ...
leetNightshade's user avatar
2 votes
Accepted

Sanity Check on my Idea for an Event System for game

First of all, there is no "right" or "wrong" in software development. Only "works for you" or "doesn't work for you". So any advise about your software ...
Philipp's user avatar
  • 119k
2 votes

encapsulation, structs and global variables?

The only difference between a class and a struct is that members within a struct are automatically public. You could just create a class for all the input: ...
Pow's user avatar
  • 321
1 vote

Is there any performance penalty to unsigned integer underflow?

Is there any performance penalty to unsigned integer underflow? No. There is no cost to the wrapping (modulo) behavior of arithmetic with unsigned integral types. Processors use same instructions ...
Adrian McCarthy's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible