Skip to content

Restructure#36

Closed
StringEpsilon wants to merge 3 commits intomainfrom
Restructure
Closed

Restructure#36
StringEpsilon wants to merge 3 commits intomainfrom
Restructure

Conversation

@StringEpsilon
Copy link
Copy Markdown
Owner

@StringEpsilon StringEpsilon commented May 6, 2023

Trying to figure out a better structure for the individual bits of the deserializer.

Currently this has a lot of duplicate code and I suspect it to be slower to do an increase in allocation. But the code is a lot more navigable and hopefully easier to maintain in a readable state and optimize in the future for better performance.

@StringEpsilon
Copy link
Copy Markdown
Owner Author

Quick and dirty benchmark:

main:

|               Method |       Mean |     Error |   StdDev |
|--------------------- |-----------:|----------:|---------:|
|             Implicit | 2,843.5 ns | 235.01 ns | 12.88 ns |
| Explict_List_Strings |   666.7 ns |  21.10 ns |  1.16 ns |
|   Explict_List_Bools |   528.7 ns |  22.27 ns |  1.22 ns |
|   Explict_List_Nulls |   516.8 ns |  23.42 ns |  1.28 ns |
| Enum_With_Attributes | 1,539.7 ns | 163.55 ns |  8.96 ns |

This branch:

|               Method |       Mean |     Error |  StdDev |
|--------------------- |-----------:|----------:|--------:|
|             Implicit | 3,424.4 ns | 114.30 ns | 6.27 ns |
| Explict_List_Strings |   750.7 ns |  59.25 ns | 3.25 ns |
|   Explict_List_Bools |   594.9 ns | 103.94 ns | 5.70 ns |
|   Explict_List_Nulls |   627.8 ns |  27.05 ns | 1.48 ns |
| Enum_With_Attributes | 1,531.0 ns |  18.03 ns | 0.99 ns |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant