Skip to content

Conversation

fiseni
Copy link
Collaborator

@fiseni fiseni commented Jun 2, 2025

Fixes #468

We could implement this by simply holding a List<string> state in the specification. However, the memory overhead of a non-empty list is 72 bytes (on x64). Considering that in 99% of cases, users will add a single tag, the memory overhead is unacceptable.

Instead, we'll create and use OneOrMany struct implementation, which has a single object? state (spending only 8 bytes for the reference). The state will represent a string or List<string depending on the situation.

@fiseni fiseni requested a review from sadukie June 2, 2025 16:04
@fiseni fiseni requested a review from Copilot June 2, 2025 20:04
Copilot

This comment was marked as resolved.

@fiseni fiseni requested a review from Copilot June 2, 2025 20:17
Copilot

This comment was marked as resolved.

@fiseni fiseni requested a review from Copilot June 3, 2025 11:06
Copilot

This comment was marked as resolved.

@fiseni fiseni merged commit b91fc7e into main Jun 3, 2025
1 check passed
@fiseni fiseni deleted the fiseni/multiple-tagwith branch June 3, 2025 11:15
This was referenced Aug 21, 2025
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.

multiple TagWith support?
1 participant