Skip to content

Commit 4759c08

Browse files
committed
all readme bm is updated to .NET 6 #332
1 parent 6bdf470 commit 4759c08

File tree

3 files changed

+28
-11
lines changed

3 files changed

+28
-11
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -132,19 +132,19 @@ Compiling expression:
132132

133133
| Method | Mean | Error | StdDev | Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated |
134134
|---------------------------- |-----------:|----------:|----------:|------:|--------:|-------:|-------:|-------:|----------:|
135-
| Compile | 148.633 us | 1.4863 us | 1.2411 us | 33.20 | 1.05 | 0.9766 | 0.4883 | - | 4.78 KB |
136-
| CompileFast | 4.498 us | 0.0887 us | 0.1022 us | 1.02 | 0.04 | 0.3510 | 0.1755 | 0.0305 | 1.46 KB |
137-
| CompileFast_LightExpression | 4.365 us | 0.0860 us | 0.1364 us | 1.00 | 0.00 | 0.3433 | 0.1678 | 0.0305 | 1.42 KB |
135+
| Compile | 179.266 us | 3.5687 us | 7.2089 us | 39.11 | 2.15 | 1.4648 | 0.7324 | - | 4.74 KB |
136+
| CompileFast | 4.791 us | 0.0955 us | 0.2307 us | 1.04 | 0.06 | 0.4578 | 0.2289 | 0.0305 | 1.41 KB |
137+
| CompileFast_LightExpression | 4.636 us | 0.0916 us | 0.1531 us | 1.00 | 0.00 | 0.4425 | 0.2213 | 0.0305 | 1.38 KB |
138138

139139

140140
Invoking the compiled delegate compared to the normal delegate and the direct call:
141141

142-
| Method | Mean | Error | StdDev | Ratio | Gen 0 | Gen 1 | Gen 2 | Allocated |
143-
|----------------------------------- |---------:|---------:|---------:|------:|-------:|------:|------:|----------:|
144-
| DirectLambdaCall | 11.86 ns | 0.140 ns | 0.131 ns | 1.00 | 0.0076 | - | - | 32 B |
145-
| CompiledLambda | 13.44 ns | 0.115 ns | 0.096 ns | 1.13 | 0.0076 | - | - | 32 B |
146-
| FastCompiledLambda | 12.43 ns | 0.173 ns | 0.154 ns | 1.05 | 0.0076 | - | - | 32 B |
147-
| FastCompiledLambda_LightExpression | 11.87 ns | 0.121 ns | 0.101 ns | 1.00 | 0.0076 | - | - | 32 B |
142+
| Method | Mean | Error | StdDev | Median | Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated |
143+
|----------------------------------- |---------:|---------:|---------:|---------:|------:|--------:|-------:|------:|------:|----------:|
144+
| DirectLambdaCall | 13.72 ns | 0.274 ns | 0.500 ns | 13.62 ns | 1.05 | 0.06 | 0.0102 | - | - | 32 B |
145+
| CompiledLambda | 17.12 ns | 1.006 ns | 2.950 ns | 15.78 ns | 1.24 | 0.15 | 0.0102 | - | - | 32 B |
146+
| FastCompiledLambda | 12.87 ns | 0.164 ns | 0.128 ns | 12.88 ns | 0.97 | 0.03 | 0.0102 | - | - | 32 B |
147+
| FastCompiledLambda_LightExpression | 13.11 ns | 0.258 ns | 0.471 ns | 13.01 ns | 1.00 | 0.00 | 0.0102 | - | - | 32 B |
148148

149149

150150
### FastExpressionCompiler.LightExpression.Expression vs System.Linq.Expressions.Expression

test/FastExpressionCompiler.Benchmarks/ManuallyComposedLambdaBenchmark.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,15 @@ public class Compilation
131131
| Compile | 148.633 us | 1.4863 us | 1.2411 us | 33.20 | 1.05 | 0.9766 | 0.4883 | - | 4.78 KB |
132132
| CompileFast | 4.498 us | 0.0887 us | 0.1022 us | 1.02 | 0.04 | 0.3510 | 0.1755 | 0.0305 | 1.46 KB |
133133
| CompileFast_LightExpression | 4.365 us | 0.0860 us | 0.1364 us | 1.00 | 0.00 | 0.3433 | 0.1678 | 0.0305 | 1.42 KB |
134+
135+
## v3.3.1
136+
137+
| Method | Mean | Error | StdDev | Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated |
138+
|---------------------------- |-----------:|----------:|----------:|------:|--------:|-------:|-------:|-------:|----------:|
139+
| Compile | 179.266 us | 3.5687 us | 7.2089 us | 39.11 | 2.15 | 1.4648 | 0.7324 | - | 4.74 KB |
140+
| CompileFast | 4.791 us | 0.0955 us | 0.2307 us | 1.04 | 0.06 | 0.4578 | 0.2289 | 0.0305 | 1.41 KB |
141+
| CompileFast_LightExpression | 4.636 us | 0.0916 us | 0.1531 us | 1.00 | 0.00 | 0.4425 | 0.2213 | 0.0305 | 1.38 KB |
142+
134143
*/
135144

136145
[Benchmark]
@@ -205,6 +214,14 @@ public class Invocation
205214
| FastCompiledLambda | 12.43 ns | 0.173 ns | 0.154 ns | 1.05 | 0.0076 | - | - | 32 B |
206215
| FastCompiledLambda_LightExpression | 11.87 ns | 0.121 ns | 0.101 ns | 1.00 | 0.0076 | - | - | 32 B |
207216
217+
## V3.3.1
218+
219+
| Method | Mean | Error | StdDev | Median | Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated |
220+
|----------------------------------- |---------:|---------:|---------:|---------:|------:|--------:|-------:|------:|------:|----------:|
221+
| DirectLambdaCall | 13.72 ns | 0.274 ns | 0.500 ns | 13.62 ns | 1.05 | 0.06 | 0.0102 | - | - | 32 B |
222+
| CompiledLambda | 17.12 ns | 1.006 ns | 2.950 ns | 15.78 ns | 1.24 | 0.15 | 0.0102 | - | - | 32 B |
223+
| FastCompiledLambda | 12.87 ns | 0.164 ns | 0.128 ns | 12.88 ns | 0.97 | 0.03 | 0.0102 | - | - | 32 B |
224+
| FastCompiledLambda_LightExpression | 13.11 ns | 0.258 ns | 0.471 ns | 13.01 ns | 1.00 | 0.00 | 0.0102 | - | - | 32 B |
208225
*/
209226
private static readonly Func<B, X> _lambdaCompiled = _expr.Compile();
210227
private static readonly Func<B, X> _lambdaCompiledFast = _expr.CompileFast(true);

test/FastExpressionCompiler.Benchmarks/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ public static void Main()
6868
//BenchmarkRunner.Run<HoistedLambdaBenchmark.Invoke>();
6969

7070
// BenchmarkRunner.Run<ManuallyComposedLambdaBenchmark.Create_and_Compile>();
71-
// BenchmarkRunner.Run<ManuallyComposedLambdaBenchmark.Compilation>();
72-
// BenchmarkRunner.Run<ManuallyComposedLambdaBenchmark.Invocation>();
71+
BenchmarkRunner.Run<ManuallyComposedLambdaBenchmark.Compilation>();
72+
BenchmarkRunner.Run<ManuallyComposedLambdaBenchmark.Invocation>();
7373
}
7474
}
7575
}

0 commit comments

Comments
 (0)