Unique random numbers in an array
I've got some code that works, but it's slow. Every page refresh is taking 2-4 seconds, which is really bad when you consider that my CF server is the same machine that I'm developing on.
If anyone could suggest how to speed this up, it would be appreciated.
VARIABLES.rcpi_count = val(ram_cfrt_path_imgs.recordCount);// currently 16
VARIABLES.rndInt = ArrayNew(1);
VARIABLES.loopLimit = 4;
thisInt = RandRange(1,VARIABLES.rcpi_count);
while(ArrayLen(VARIABLES.rndInt) LT 4);