You must log in or register to comment.
This could be really neat for optimized builds. If using a PHF produces more efficient code for
Debug
representations, then even at the expense of compile times (only in optimized builds) it might be a big win for libraries using huge error enums.I wonder if this can be extrapolated even further for error enums that have nested errors in it (with no dynamic fields except the nested error enums), using a PHF to map all the potentially hundreds of variant/subvariant combinations to unique strings, of course assuming this results in a performance win. I’m sure there are even more places where it could be useful to use a PHF too.