Alternate Random Sort?
Brian Yennie
briany at qldlearning.com
Fri Jul 14 17:13:15 EDT 2006
By my tests this is at least as fast as the array kludge I came up
with. Egads, is that a bug or a feature? I know for repeat loops Rev is
"smarter" than that and will only evaluate the expression once, but it
does in fact appear that it recalculates the value over and over again
with the sort command!
Bugzilla? Or is there a reason why it works this way? I guess maybe the
"of each" constructs cause this, but it still seems like it could be
optimized.
Either way, I think Sarah's solution is probably a lot cleaner than my
workaround.
> Instead of asking it to compute the length of your list for every
> line, how about just using:
> sort lines of temp by random(10000000)
> or some suitably large number?
More information about the use-livecode
mailing list