Skip to content

Conversation

@0101
Copy link
Contributor

@0101 0101 commented Dec 16, 2022

These are the results on my machine:

BenchmarkDotNet=v0.13.2, OS=Windows 10 (10.0.19045.2311)
AMD Ryzen 9 5900X, 1 CPU, 24 logical and 12 physical cores
.NET SDK=7.0.100
  [Host]     : .NET 7.0.0 (7.0.22.51805), X64 RyuJIT AVX2 DEBUG
  Job-GIHPTA : .NET 7.0.0 (7.0.22.51805), X64 RyuJIT AVX2

InvocationCount=1  UnrollFactor=1  
Method IdentCapture Mean Error StdDev Allocated
ParseBigFile False 105.0 ms 1.23 ms 1.15 ms 30.2 MB
ParseBigFile True 107.3 ms 1.01 ms 0.90 ms 32.8 MB

Seems it has a measurable impact. But just barely. Is it worth adding a flag to skip it for those who don't need it?

@auduchinok
Copy link
Member

@0101 We do lots of additional parsing in Rider, and it would be great to not do extra work that could add additional GC pressure. We also don't plan to use this flag, so it seems it makes sense to make the parser also use it. Thank you for passing the flag to the parser!

@nojaf nojaf mentioned this pull request Dec 19, 2022
@0101 0101 changed the title Benchmarking performance impact of capturing identifiers during parsing Put capturing identifiers during parsing under an options flag Dec 20, 2022
@0101 0101 marked this pull request as ready for review December 20, 2022 11:35
@0101 0101 requested a review from a team as a code owner December 20, 2022 11:35
@0101 0101 requested a review from a team January 9, 2023 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants