Uploaded image for project: 'Swift'
  1. Swift
  2. SR-14982

UnsafeMutableRawBufferPointer.initializeMemory(as:from: ) has no fast path for contiguous Collections

    XMLWordPrintable

    Details

      Description

      UMRBP.initializeMemory<T,S>(as type: T.Type, from source: S) takes a Sequence and and initializes an UMRBP element-by-element (see here). Note that the closest equivalent function on UnsafeMutableRawPointer is the most likely way to add a fast-path for this, by using withContiguousStorageIfAvailable on source.

      Adding a fast path may require adding an overload.

        Attachments

          Activity

            People

            Assignee:
            glessard Guillaume Lessard
            Reporter:
            glessard Guillaume Lessard
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: