Skip to content

feat: add Generic conformance for UUID and Date#9

Merged
tmcdonell merged 2 commits into
mainfrom
feat/generic-date-uuid
Dec 15, 2025
Merged

feat: add Generic conformance for UUID and Date#9
tmcdonell merged 2 commits into
mainfrom
feat/generic-date-uuid

Conversation

@tmcdonell

@tmcdonell tmcdonell commented Dec 12, 2025

Copy link
Copy Markdown
Contributor

Summary

Adds (unboxed) Generic protocol conformance for UUID and Date.

  • UUID uses a SIMD16<UInt8> raw representation, which matches the internal uuid_t type of a 16-wide tuple. I also tried UInt128 (macOS 15+) or SIMD2<UInt64>, but when loading the values (for copying in-out of the array) Swift/LLVM is smart enough to just do so as a single SIMD2<UInt64> in all cases.
  • Date goes via the time interval since reference date so should be a no-op.

@tmcdonell tmcdonell requested a review from JaapWijnen December 12, 2025 12:55
@tmcdonell tmcdonell force-pushed the feat/generic-date-uuid branch from 72d6643 to 9aec95b Compare December 13, 2025 15:55
Comment thread Sources/MultiArray/Generic/UUID.swift Outdated
@tmcdonell tmcdonell force-pushed the feat/generic-date-uuid branch from 9aec95b to 782908c Compare December 15, 2025 13:58
@tmcdonell tmcdonell merged commit 121f412 into main Dec 15, 2025
3 checks passed
@tmcdonell tmcdonell deleted the feat/generic-date-uuid branch December 15, 2025 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants