@Jeff: You can speed this code up quite a bit by removing parseInt (which shouldn't be used in the first place).
–
BlenderMay 13 '13 at 16:17

6

@Jeff: Okay then, let me put it bluntly. parseInt is the wrong function to convert a float into an int. You're beating a nail in with a shoe. parseInt converts the first argument from a float into a string and then back into an integer. There's no justification for using it.
–
BlenderMay 22 '13 at 6:59

10

Irrelevant micro-optimization is the root of all evils (ok, I modified the phrase). If it shuffles a million floats in 75ms it's silly to micro-optimize with bitwise operators or avoiding parseInt. That wouldn't change the algorithm complexity. This method ROCKS
–
Edgar Villegas AlvaradoAug 29 '13 at 7:56

5

This method (as well as the one below) both modify the original array. That's no big deal, but the example of how to call it is a bit weird.
–
MichaelJul 11 '14 at 12:52