Update JSON platform benchmarks to use JSON source generator#1683
Update JSON platform benchmarks to use JSON source generator#1683halter73 merged 4 commits intoaspnet:mainfrom
Conversation
src/BenchmarksApps/Kestrel/PlatformBenchmarks/BenchmarkApplication.Json.cs
Outdated
Show resolved
Hide resolved
d53e6de to
79b1285
Compare
|
@layomia I was looking forward to find out what is the difference for Caching benchmark, where so far 40% of time was spent for JSON serialization. So I run the benchmarks against your fork:
That gives us a 100k RPS GAIN which is almost |
adamsitnik
left a comment
There was a problem hiding this comment.
This is simply most impressive. Great work @layomia !
|
Thanks @adamsitnik! FWIW I set out wanting to measure the caching benchmark diff, but somehow thought it was the "multiple_queries" scenario. Happy the RPS improved, as we hoped! |
src/BenchmarksApps/Kestrel/PlatformBenchmarks/PlatformBenchmarks.csproj
Outdated
Show resolved
Hide resolved
f1cfdff to
b637b37
Compare
src/BenchmarksApps/Kestrel/PlatformBenchmarks/PlatformBenchmarks.csproj
Outdated
Show resolved
Hide resolved
4301e47 to
cb783e0
Compare
|
Not seeing the whole changeset, would this break on 3.1 or 5.0? Last time I checked the PR it would require different versions of the code. |
|
@sebastienros the 3.1 and 5.0 implementations are unchanged in this PR, meaning that they don't use the source generator and things shouldn't break. This is based on ifdef'ing the new code based on |
|
Thanks @layomia |
We see a small increase in RPS and a big drop in max alloc rate for the
jsonbenchmark. There's also a small increase in RPS for thesingle_querybenchmark. Otherwise, the rest of the benchmarks don't change substantially.Benchmarks were run in 6 iterations; excluding the worst two and the best result; then taking the mean.
Benchmarks had 30s warmup.
Benchmarks run on
aspnet-citrine-linprofile.FYI @sebastienros @adamsitnik @eerhardt @steveharter @ericstj @stephentoub @jkotas @davidfowl