Skip to content

Source generated SearchValues? #95179

Answered by stephentoub
pawchen asked this question in General
Nov 23, 2023 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

it might be stupid. If Regex can benefit from compile-time generated codes, and it's starting to use SearchValues, why not put those analysis of SearchValues.Create in compile time?

The regex source generator will emit use of SearchValues.

If you instead mean why does it emit a call to Create rather than emitting the logic behind Create, there's a lot of complicated logic there and it would require making public all the implementation details that back it, which we'd like to be able to (and plan to) evolve over time, and which includes a ton of vectorization-related logic we don't want to bake into every assembly.

It's not stupid. Your suggestion is actually where we started, and then w…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@pawchen
Comment options

@gfoidl
Comment options

@pawchen
Comment options

Answer selected by pawchen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants