Skip to content

Conversation

nblumhardt
Copy link
Member

@nblumhardt nblumhardt commented Jul 23, 2024

These changes came out of investigating #2088; in the results below, BindStructure is the affected benchmark. The reduction in allocations is modest, it seems like there's still plenty of room to improve here. Reduction in allocations is pretty great :-)

BenchmarkDotNet v0.13.12, macOS Sonoma 14.5 (23F79) [Darwin 23.5.0]
Apple M3 Pro, 1 CPU, 11 logical and 11 physical cores
.NET SDK 8.0.303
  [Host]     : .NET 8.0.7 (8.0.724.31311), Arm64 RyuJIT AdvSIMD
  DefaultJob : .NET 8.0.7 (8.0.724.31311), Arm64 RyuJIT AdvSIMD

Before (dev)

Method Mean Error StdDev Ratio RatioSD Gen0 Allocated Alloc Ratio
BindZero 14.17 ns 0.298 ns 0.278 ns 1.00 0.00 - - NA
BindOne 58.85 ns 0.768 ns 0.718 ns 4.15 0.09 0.0172 144 B NA
BindFive 152.19 ns 2.418 ns 2.262 ns 10.74 0.30 0.0515 432 B NA
BindStructure 350.08 ns 4.221 ns 3.948 ns 24.71 0.46 0.1040 872 B NA

After

Method Mean Error StdDev Ratio RatioSD Gen0 Allocated Alloc Ratio
BindZero 14.72 ns 0.323 ns 0.463 ns 1.00 0.00 - - NA
BindOne 58.47 ns 1.123 ns 1.050 ns 3.92 0.16 0.0172 144 B NA
BindFive 156.40 ns 2.236 ns 1.982 ns 10.47 0.44 0.0515 432 B NA
BindStructure 269.38 ns 1.498 ns 1.328 ns 18.03 0.64 0.0582 488 B NA

@nblumhardt nblumhardt marked this pull request as draft July 23, 2024 04:06
@nblumhardt
Copy link
Member Author

Updated the benchmark results above; looking good now! 😎

@nblumhardt nblumhardt marked this pull request as ready for review July 24, 2024 06:48
@nblumhardt
Copy link
Member Author

Ready to go 👍

@nblumhardt nblumhardt merged commit 5844a9f into serilog:dev Jul 24, 2024
1 check passed
@nblumhardt nblumhardt mentioned this pull request Jul 24, 2024
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