Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance improvement #177

Merged
merged 13 commits into from
Jun 22, 2024
Merged

Conversation

alirezanet
Copy link
Owner

@alirezanet alirezanet commented Jun 21, 2024

BenchmarkDotNet v0.13.10, Windows 11 (10.0.22631.3737/23H2/2023Update/SunValley3)
AMD Ryzen 7 7800X3D, 1 CPU, 16 logical and 8 physical cores
.NET SDK 8.0.206
[Host] : .NET 8.0.6 (8.0.624.26715), X64 RyuJIT AVX2
DefaultJob : .NET 8.0.6 (8.0.624.26715), X64 RyuJIT AVX2

Method Mean Error StdDev Ratio RatioSD Allocated Alloc Ratio
Gridify 591.8 us 5.41 us 5.07 us 0.92 0.04 35.65 KB 1.09
Gridify_WithoutMapper 603.4 us 4.39 us 4.10 us 0.94 0.04 40.81 KB 1.25
Native_LINQ 636.1 us 11.31 us 18.90 us 1.00 0.00 32.63 KB 1.00

…collection method

Simplify initialization of _diagnostics list
Use null-coalescing operator for initializing _diagnostics
Add new private method AddDiagnostics for managing diagnostics
Improve readability by clearly separating concerns
- Replace SyntaxNode with ISyntaxNode throughout the project
- Update ExpressionSyntax and derived classes to implement ISyntaxNode
- Modify constructors and methods to accommodate the new interface
- Ensure consistency in method signatures using ISyntaxNode
@alirezanet alirezanet changed the base branch from master to DictionarySupport June 21, 2024 21:47
@alirezanet alirezanet marked this pull request as ready for review June 21, 2024 22:29
Removed redundant catch block around AddMap calls
Improved syntax tree traversal with direct descendant extraction
Directly throw exceptions if fields are not mapped correctly
@alirezanet alirezanet merged commit af655db into DictionarySupport Jun 22, 2024
@alirezanet alirezanet deleted the PerformanceImprovement branch June 22, 2024 18:15
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.

2 participants