ipnetwork icon indicating copy to clipboard operation
ipnetwork copied to clipboard

Feature request: IPNetwork.Parse(ReadOnlySpan<char>)

Open Bond-009 opened this issue 6 years ago • 4 comments

Most if not all Parse methods in netstandard2.1 accept ReadOnlySpan<char>

Bond-009 avatar Oct 15 '19 17:10 Bond-009

Dear Bond-009,

Thanks for your feedback. I'll have a look at this if time permits.

lduchosal avatar Dec 27 '19 15:12 lduchosal

Does this need to be anything more than converting to a string and calling through to Parse(string)?

billpg avatar Dec 21 '22 17:12 billpg

@billpg : The other way around. We may code Parse to use ROS and call it from Parse(string ..) string.AsSpan()..,.

This may give a direction

https://blog.ndepend.com/improve-c-code-performance-with-spant/

Span<T>/ReadOnlySpan<T> are special API that required heavy runtime modifications to offer improvements in very high performance critical scenarios. Not everyone needs its power but for those that needs it, it is a game changer.

I do agree with this article conclusion, do we really need it ? may be if time permits

lduchosal avatar Dec 22 '22 06:12 lduchosal

Gotcha. The task is to refactor the various Parse functions to use ROSc and add string functions.

billpg avatar Dec 22 '22 09:12 billpg