On Sat, May 27, 2023 at 4:31 AM Alex Shinn <[email protected]> wrote:
> The expensive path is array-copy of an array-map or other generalized > array. > True, but because array-map is lazy there is never any guarantee that getting an element of an array constructed by array-map returns the same value every time (e.g. it could return a random number), and so *actual* safety, as opposed to formal call/cc-safety, is never guaranteed whether you make an intermediate list or not. A "sufficiently smart compiler" could transform the idiom (array-copy (array-map ...)) to use array-copy! instead.
