What's the difference between arc4random and random?
+7
A:
random
is known to be predictable and thus not to be used for secure pseudo-random number generation. arc4random
is a newer, less predictable pseudo-random number generator. If you are not using it for anything secure, random
will work fine.
coneybeare
2010-05-08 13:19:24
`random` is also significantly faster than `arc4random`, which is why you'd ever use it at all.
Colin Gislason
2010-05-08 13:25:12
@Colin Cislason: How much faster? Does it make any difference if you aren't creating 1000nds of random numbers?
Emil
2010-05-08 13:57:05
Colin Gislason
2010-05-08 19:20:54