-
Notifications
You must be signed in to change notification settings - Fork 174
Closed
Description
On a quad core/4hz machine with .NET Core 3.1 using static vs creating a new instance is about 110 times slower (using encode/decode) testing with 1M integers.
Using a single instance is super fast, so due to performance gains I'd like to use a single instance and share it across threads. So therefore it brings into question thread safety.
I've been testing encode/decode with Parallel.For and I don't see any issues. No locks and ids generated are valid compared to creating new instances.
I'd appreciate if you can confirm thread safety for this library, due to performance gains its worth using a single instance instead of just creating a new instance every time.
Metadata
Metadata
Assignees
Labels
No labels