-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add benchmarks and compare to other libraries #2
Comments
WTF??? I just started on adding some benchmarks, then
They seriously publish a debug-build of DeviceDetector.NET. --> totpero/DeviceDetector.NET#44 (well if the project is stale...but to be fair). |
Did a first comparison (and re-checked the numbers, as it's impressive even for the non-cached usage 🚀):
Benchmark-code: ee2368a |
I didn't look into the issues when I started the benchmarks :-( |
No problem. I submit a PR with the benchs for the comparison, then I hope we both are happy 😃 |
Should we add these numbers from above to the ReadMe or link from the ReadMe to here? Due the comments it should be separate. Maybe check the results file in and link from the ReadMe? |
Yes, we should add them to the readme |
.NET 6 Benchmark BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19043.1348 (21H1/May2021Update)
AMD Ryzen 9 5950X, 1 CPU, 32 logical and 16 physical cores
.NET SDK=6.0.100
[Host] : .NET 6.0.0 (6.0.21.52210), X64 RyuJIT
ShortRun : .NET 6.0.0 (6.0.21.52210), X64 RyuJIT
Job=ShortRun IterationCount=3 LaunchCount=1
WarmupCount=3
| Method | Categories | Data | Mean | Error | StdDev | Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated |
|------------------- |----------- |------------- |-----------------:|------------------:|---------------:|---------:|--------:|----------:|----------:|---------:|-------------:|
| MyCSharp | Basic | Chrome Win10 | 25,791.72 ns | 1,468.128 ns | 80.473 ns | 1.00 | 0.00 | - | - | - | 432 B |
| UAParser | Basic | Chrome Win10 | 14,845,743.23 ns | 2,080,079.003 ns | 114,016.149 ns | 575.61 | 6.21 | 656.2500 | 343.7500 | 156.2500 | 11,449,360 B |
| DeviceDetector.NET | Basic | Chrome Win10 | 45,725,500.00 ns | 10,948,162.399 ns | 600,105.724 ns | 1,772.84 | 17.86 | 2000.0000 | 1000.0000 | - | 41,508,464 B |
| | | | | | | | | | | | |
| MyCSharp | Cached | Chrome Win10 | 79.33 ns | 0.921 ns | 0.050 ns | 1.00 | 0.00 | - | - | - | - |
| UAParser | Cached | Chrome Win10 | 748,833.33 ns | 1,056,427.069 ns | 57,906.332 ns | 9,439.05 | 729.85 | - | - | - | 38,208 B |
| | | | | | | | | | | | |
| MyCSharp | Basic | Google-Bot | 2,399.84 ns | 423.008 ns | 23.186 ns | 1.00 | 0.00 | - | - | - | - |
| UAParser | Basic | Google-Bot | 14,320,067.71 ns | 213,954.583 ns | 11,727.573 ns | 5,967.46 | 58.88 | 625.0000 | 328.1250 | 140.6250 | 10,946,582 B |
| DeviceDetector.NET | Basic | Google-Bot | 3,118,447.79 ns | 100,384.159 ns | 5,502.394 ns | 1,299.52 | 12.94 | 156.2500 | 39.0625 | - | 2,628,468 B |
| | | | | | | | | | | | |
| MyCSharp | Cached | Google-Bot | 57.21 ns | 5.526 ns | 0.303 ns | 1.00 | 0.00 | - | - | - | - |
| UAParser | Cached | Google-Bot | 416,898.34 ns | 10,947.707 ns | 600.081 ns | 7,287.14 | 49.12 | 2.4414 | - | - | 45,856 B | |
We should a add benchmark project and also run a comparison with other libraries.
Maybe we can run the benchmarks as part of CI (once public we get "unlimited" time)?
(But TBH I don't know if this is worth it).
The text was updated successfully, but these errors were encountered: