Copy immutable vector more efficiently.
Thanks to @mflatt for the suggestion.
This commit is contained in:
parent
e814d742a7
commit
b8d4248053
|
@ -179,9 +179,9 @@
|
|||
(apply raise-blame-error blame #:missing-party neg-party val args))
|
||||
(check val raise-blame #f)
|
||||
(if (and (immutable? val) (not (chaperone? val)))
|
||||
(apply vector-immutable
|
||||
(for/list ([e (in-vector val)])
|
||||
(elem-pos-proj e neg-party)))
|
||||
(vector->immutable-vector
|
||||
(for/vector #:length (vector-length val) ([e (in-vector val)])
|
||||
(elem-pos-proj e neg-party)))
|
||||
(chaperone-or-impersonate-vector
|
||||
val
|
||||
(checked-ref neg-party)
|
||||
|
|
Loading…
Reference in New Issue
Block a user