-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Optimise stringToEnum #3863
Copy link
Copy link
Closed
Labels
optimizationstandard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
optimizationstandard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
The current implementation of
stringToEnumis:This could be much more efficient if a perfect hash was created and is therefore one motivation for a perfect hashing algorithm to be in the standard library.
FWIW my current usecase for this is converting known HTTP field names to an enum.