dotnet / corefxlab

This repo is for experimentation and exploring new ideas that may or may not make it into the main corefx repo.
MIT License
1.46k stars 345 forks source link

Implement float and double parsing support for InvariantParser. #748

Closed jonfortescue closed 7 years ago

jonfortescue commented 8 years ago

Float and doubles are technically supported as of PR #756. However, due to the placeholder nature of these methods, this issue will be left unresolved for now.

mellinoe commented 7 years ago

@KrzysztofCwalina @shiftylogic Is anyone signed up to implement this? I was switching my code to use some System.Text.Primitives stuff, but it's not really feasible until Single parsing works.

shiftylogic commented 7 years ago

@mellinoe Feel free to grab it.

mellinoe commented 7 years ago

@shiftylogic I actually may have some time to donate this weekend. Have we thought about a strategy here? I was able to get a version working by copy-and-pasting a bunch of CoreRT code into my project, and making it use ReadOnlySpan<char> instead of string:

https://github.com/mellinoe/veldrid/commit/7dbff1e2f1a7b7dbafd30c259808489547ce506a#diff-cf17d1fbcf0291cb053cdd4f7bf44708

I don't know if the CoreRT version is very good, though -- only that it is pure C#.

shiftylogic commented 7 years ago

@mellinoe That is not a bad strategy. For some of the encoders, we have copied implementations from coreclr and modified them for Span. That seems to work and give us a performance boost from naïve implementations. If nothing else, it is a good starting point that we can then optimize further if needed.

KrzysztofCwalina commented 7 years ago

this is done

mellinoe commented 7 years ago

@KrzysztofCwalina I see that things have been reorganized a bit. Where is the float-parsing functionality at now?

KrzysztofCwalina commented 7 years ago

System.Memory package (corefx). It's allocating though.