File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,11 @@ fn debug_print_generated(ast: &DeriveInput, toks: &TokenStream) {
5151/// See the [Additional Attributes](https://docs.rs/strum/latest/strum/additional_attributes/index.html)
5252/// Section for more information on using this feature.
5353///
54- /// If you have a large enum, you may want to consider using the `use_phf` attribute here. It leverages
55- /// perfect hash functions to parse much quicker than a standard `match`. (MSRV 1.46)
54+ /// If you have a large enum, you may want to consider using the `use_phf` attribute here.
55+ /// PHF (Perfect Hash Functions) use a hash lookup instead of a linear search that may perform faster
56+ /// for large enums. Note: as with all optimizations, you should test this for your specific usecase
57+ /// rather than just assume it will be faster. With SIMD + pipelining, linear string search (aka memcmp)
58+ /// can be very fast for enums with a surprisingly large number of enum variants.
5659///
5760/// The default error type is `strum::ParseError`. This can be overriden by applying both the
5861/// `parse_err_ty` and `parse_err_fn` attributes at the type level. `parse_error_fn` should be a
You can’t perform that action at this time.
0 commit comments