diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-12-29 00:14:55 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-12-29 00:14:55 -0800 |
commit | 764d555e6284e4314c3149a558fe5311eeb361c9 (patch) | |
tree | 40fb5c0327c5cde5d220a9d27bf929a782c09491 | |
parent | 623c57e57c8757a005b863954f05e8b0f697221b (diff) | |
download | txr-764d555e6284e4314c3149a558fe5311eeb361c9.tar.gz txr-764d555e6284e4314c3149a558fe5311eeb361c9.tar.bz2 txr-764d555e6284e4314c3149a558fe5311eeb361c9.zip |
shuffle/nshuffle: eliminate wasteful vector copy.
* lib.c (nshuffle): When shuffling the vector that was
converted from the list, use nshuffle rather shuffle, because
it's a temporary, non-shared object we can mutate.
-rw-r--r-- | lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -9663,7 +9663,7 @@ val nshuffle(val seq) case SEQ_LISTLIKE: if (cdr(seq)) { - val v = shuffle(vec_list(seq)); + val v = nshuffle(vec_list(seq), randstate); val i, l; for (l = seq, i = zero; l; i = succ(i), l = cdr(l)) |