Skip to content

Conversation

@jkoritzinsky
Copy link
Member

Use a System.Threading.Lock instance directly instead of going through the syncblock on the ConcurrentDictionary.

Use a System.Threading.Lock instance directly instead of going through the syncblock on the ConcurrentDictionary.
@jkoritzinsky
Copy link
Member Author

@MihuBot benchmark System.Text.RegularExpressions.Tests.Perf_Regex_Cache

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions
See info in area-owners.md if you want to be subscribed.

@MihaZupan
Copy link
Member

MihuBot/runtime-utils#1711

System.Text.RegularExpressions.Tests.Perf_Regex_Cache
BenchmarkDotNet v0.14.1-nightly.20250107.205, Linux Ubuntu 22.04.5 LTS (Jammy Jellyfish)
AMD EPYC 9V74, 1 CPU, 8 logical and 4 physical cores
LongRun : .NET 11.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
Job=LongRun  OutlierMode=DontRemove  IterationCount=100
LaunchCount=3  MemoryRandomization=True  WarmupCount=15
Method Toolchain total unique cacheSize Mean Error Ratio Allocated Alloc Ratio
IsMatch Main 40000 7 0 25.653 ms 0.1454 ms 1.00 96960012 B 1.00
IsMatch PR 40000 7 0 25.135 ms 0.1054 ms 0.98 96960012 B 1.00
IsMatch Main 40000 1600 15 62.878 ms 0.1261 ms 1.00 154806351 B 1.00
IsMatch PR 40000 1600 15 63.127 ms 0.1273 ms 1.00 154806351 B 1.00
IsMatch Main 40000 1600 800 45.539 ms 0.1484 ms 1.00 80778953 B 1.00
IsMatch PR 40000 1600 800 45.711 ms 0.1209 ms 1.00 80811257 B 1.00
IsMatch Main 40000 1600 3200 7.397 ms 0.0159 ms 1.00 49960 B 1.00
IsMatch PR 40000 1600 3200 7.492 ms 0.0271 ms 1.01 49960 B 1.00
IsMatch Main 400000 1 15 23.476 ms 0.3509 ms 1.01 84 B 1.00
IsMatch PR 400000 1 15 22.685 ms 0.0600 ms 0.97 84 B 1.00
IsMatch Main 400000 7 15 27.475 ms 0.0599 ms 1.00 564 B 1.00
IsMatch PR 400000 7 15 27.929 ms 0.1273 ms 1.02 572 B 1.01
IsMatch_Multithreading Main 40000 7 0 8.232 ms 0.0500 ms 1.00 96961149 B 1.00
IsMatch_Multithreading PR 40000 7 0 7.953 ms 0.0543 ms 0.97 96961140 B 1.00
IsMatch_Multithreading Main 40000 1600 15 22.587 ms 0.2458 ms 1.00 154807707 B 1.00
IsMatch_Multithreading PR 40000 1600 15 22.258 ms 0.0890 ms 0.99 154775173 B 1.00
IsMatch_Multithreading Main 40000 1600 800 20.011 ms 0.0528 ms 1.00 80012774 B 1.00
IsMatch_Multithreading PR 40000 1600 800 20.199 ms 0.0579 ms 1.01 80020453 B 1.00
IsMatch_Multithreading Main 40000 1600 3200 2.616 ms 0.0138 ms 1.00 81081 B 1.00
IsMatch_Multithreading PR 40000 1600 3200 2.595 ms 0.0066 ms 0.99 81071 B 1.00
IsMatch_Multithreading Main 400000 1 15 11.337 ms 0.0664 ms 1.00 1062090 B 1.00
IsMatch_Multithreading PR 400000 1 15 11.622 ms 0.0991 ms 1.03 1924845 B 1.81
IsMatch_Multithreading Main 400000 7 15 24.517 ms 0.0552 ms 1.00 66529120 B 1.00
IsMatch_Multithreading PR 400000 7 15 24.260 ms 0.0489 ms 0.99 68080240 B 1.02

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

Labels

area-System.Text.RegularExpressions NO-REVIEW Experimental/testing PR, do NOT review it

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants