NUlid icon indicating copy to clipboard operation
NUlid copied to clipboard

Possible improvements from Cysharp/Ulid

Open TimothyMakkison opened this issue 2 years ago • 2 comments

Created a pull request with some potential optimizations/code modernisation for Cysharp/Ulidd. Not sure if any changes would apply here, it looks like NUlid and Ulid serialize to Guid in different ways (not 100% sure only glanced at it).

I meant to check if any improvements would apply to NUlid and create a pr, but I've been busy so I'll just dump the work on you 😆

TimothyMakkison avatar Dec 28 '22 21:12 TimothyMakkison

I just merged #22, I'll see, at a later date, if something in your PR applies to this. Thanks!

RobThree avatar Dec 28 '22 21:12 RobThree

At a glance the get DateTimeOffset optimisation might apply.

My vectorized decode CrockfordBase32 is faster than the manual version, with some slight modifications (currently turns invalid characters into 31) it would probably be an improvement on your current Parse(ReadOnlySpan<char> span). This was more of POC so there are definitely improvements to be made.

TimothyMakkison avatar Dec 28 '22 21:12 TimothyMakkison