Hacker News new | ask | show | jobs
by sdegutis 3508 days ago
Out of curiosity, what's wrong with that line? Why is it slow?
1 comments

starting from inside the arc4random call you have double float multiplication, then cast to uint32, then the arc4rand call, then the double cast for the uint32 result and then a double float division. this adds up in instructions.