2
In language C, enter unsigned int
and int
, what is the fastest type? I know (think) that unsigned
can store larger numbers why int
reserve a bit (space) for the signal and unsigned
no. But which the fastest in practice?
2
In language C, enter unsigned int
and int
, what is the fastest type? I know (think) that unsigned
can store larger numbers why int
reserve a bit (space) for the signal and unsigned
no. But which the fastest in practice?
2
It depends on the platform, but is generally the same. Use the unmarked types is more complicated than it seems and you should only use it if you really need it and understand all the implications, especially when they interact with flagged types. In grid part of the cases in loops for
the most correct is to use size_t
and not int
as everyone uses. But it always depends on what you are doing, and in practice, in most cases, the result is the same.
What is size_t? and what does "flagged" and "unmarked mean"?
Translation of Signed and unsigned. https://answall.com/q/104118/101
Browser other questions tagged c performance typing int
You are not signed in. Login or sign up in order to post.
Faster for what?
– Woss
Calculations, incrementing and decreasing. More specifically in 'for' cycles'.
– Erick
(post-incremeto and post-decrement as well, of course)
– Erick