corefxlab icon indicating copy to clipboard operation
corefxlab copied to clipboard

PrimitiveParser: Decide on a policy and API surface area for parsing hexadecimal numbers from text

Open botaberg opened this issue 10 years ago • 4 comments

When parsing hexadecimal characters from text, should there be specific overloads for strings containing uppercase ABCDEF and lowercase abcdef? Should there be one overload that is case-insensitive?

botaberg avatar Nov 09 '16 22:11 botaberg

@KrzysztofCwalina FYI - this issue has been created and I have assigned myself. @yizhang82 has recommended that the overloads be case-insensitive, since the alternative seems to be bloated in terms of API surface area. What do you think?

botaberg avatar Nov 09 '16 22:11 botaberg

The advantage of having separate overloads would be better performance, right? So, what is the performance difference?

svick avatar Nov 10 '16 01:11 svick

We don't know yet. We will be writing performance benchmarks to better understand and compare our options.

botaberg avatar Nov 10 '16 18:11 botaberg

The parsers has been productized and moved to corefx. I think hex parsing is now case insensitive: https://github.com/dotnet/corefx/blob/master/src/System.Memory/src/System/Buffers/Text/Utf8Parser/ParserHelpers.cs#L29

KrzysztofCwalina avatar Nov 09 '17 21:11 KrzysztofCwalina