SE-0229 — SIMD Vectors

The absence of these today does not preclude their addition in the future. If we were to add them in the future, I would define them just like Vector4 is here.

There are at least three reasons to be hesitant about doing this:

  • We want to be able to use these types and operations to implement stdlib features for performance reasons.
  • If we do this, either the SIMD module would be implicitly imported any time you have a C header that uses vector types, or the imported interface of a C library would vary depend on whether or not you imported the Swift SIMD module as well.
  • There's no precedent for it. We will absolutely have distributed-with-swift-but-not-stdlib libraries at some point, but the bar to creating the first one is high.
6 Likes