-
Notifications
You must be signed in to change notification settings - Fork 647
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
Should we consider FastExpressionCompiler? #5070
Comments
For comparison reasons I also included the before optimization state again which was already shown in #4125. I hope this doesn't confuse people. |
Here the direct comparison results for better visibility with the current state as baseline PipelineOptimizationsFastCompiler.zip ExecutionBenchmarkDotNet=v0.10.1, OS=Microsoft Windows NT 6.2.9200.0
Processor=Intel(R) Xeon(R) CPU E5-2673 v3 2.40GHz, ProcessorCount=8
Frequency=10000000 Hz, Resolution=100.0000 ns, Timer=UNKNOWN
[Host] : Clr 4.0.30319.42000, 32bit LegacyJIT-v4.7.2115.0
DefaultJob : Clr 4.0.30319.42000, 32bit LegacyJIT-v4.7.2115.0
WarmupBenchmarkDotNet=v0.10.1, OS=Microsoft Windows NT 6.2.9200.0
Processor=Intel(R) Xeon(R) CPU E5-2673 v3 2.40GHz, ProcessorCount=8
Frequency=10000000 Hz, Resolution=100.0000 ns, Timer=UNKNOWN
[Host] : Clr 4.0.30319.42000, 32bit LegacyJIT-v4.7.2115.0
DefaultJob : Clr 4.0.30319.42000, 32bit LegacyJIT-v4.7.2115.0
ExceptionBenchmarkDotNet=v0.10.1, OS=Microsoft Windows NT 6.2.9200.0
Processor=Intel(R) Xeon(R) CPU E5-2673 v3 2.40GHz, ProcessorCount=8
Frequency=10000000 Hz, Resolution=100.0000 ns, Timer=UNKNOWN
[Host] : Clr 4.0.30319.42000, 32bit LegacyJIT-v4.7.2115.0
DefaultJob : Clr 4.0.30319.42000, 32bit LegacyJIT-v4.7.2115.0
|
added: Untyped overload for TryCompile(ExpressionInfo..) added: ExpressionInfo.Parameter
Hi @danielmarbach, Here is the gist with use of Code is slightly modified. It is compile-able but I did not check or measure it. Please use the last FastExpressionCompiler.cs from the master. |
@dadhi what would be the benefit of using it that way over compile fast? |
The benefit of Here is the benchmark to get you an idea on how performance may differ. |
I will add this to my benchmark and then repost the results next week |
I have released FEC v1.5. Even better I have added conversion from Check the updated gist with added toggle between |
Last run with only ExpressionInfo PipelineOptimizationsExpressionInfo.zip ExecutionBenchmarkDotNet=v0.10.1, OS=Microsoft Windows NT 6.2.9200.0
Processor=Intel(R) Xeon(R) CPU E5-2673 v3 2.40GHz, ProcessorCount=8
Frequency=10000000 Hz, Resolution=100.0000 ns, Timer=UNKNOWN
[Host] : Clr 4.0.30319.42000, 32bit LegacyJIT-v4.7.2115.0
Job-YGLQQT : Clr 4.0.30319.42000, 32bit LegacyJIT-v4.7.2115.0
ShortRun : Clr 4.0.30319.42000, 32bit LegacyJIT-v4.7.2115.0
LaunchCount=1 TargetCount=3 WarmupCount=3
ExceptionBenchmarkDotNet=v0.10.1, OS=Microsoft Windows NT 6.2.9200.0
Processor=Intel(R) Xeon(R) CPU E5-2673 v3 2.40GHz, ProcessorCount=8
Frequency=10000000 Hz, Resolution=100.0000 ns, Timer=UNKNOWN
[Host] : Clr 4.0.30319.42000, 32bit LegacyJIT-v4.7.2115.0
Job-YGLQQT : Clr 4.0.30319.42000, 32bit LegacyJIT-v4.7.2115.0
ShortRun : Clr 4.0.30319.42000, 32bit LegacyJIT-v4.7.2115.0
LaunchCount=1 TargetCount=3 WarmupCount=3
WarmupBenchmarkDotNet=v0.10.1, OS=Microsoft Windows NT 6.2.9200.0
Processor=Intel(R) Xeon(R) CPU E5-2673 v3 2.40GHz, ProcessorCount=8
Frequency=10000000 Hz, Resolution=100.0000 ns, Timer=UNKNOWN
[Host] : Clr 4.0.30319.42000, 32bit LegacyJIT-v4.7.2115.0
Job-YGLQQT : Clr 4.0.30319.42000, 32bit LegacyJIT-v4.7.2115.0
ShortRun : Clr 4.0.30319.42000, 32bit LegacyJIT-v4.7.2115.0
LaunchCount=1 TargetCount=3 WarmupCount=3
|
@danielmarbach I see a bit faster Warm-up, now ~7 times. Other things without change, which is expected :) |
I don't mind too much about the warmup time, but
does sound very interesting indeed. It's good to see that we could pull this in without actually increasing our nuget dependency footprint. It's still a new dependency to manage and maintain though. In general, I'm +1 on this though. Adding this to the weekly sync topics. |
Closing this issue as we all agreed that we'd like to use FastExpressionCompiler in the future. This is nothing we can pull in anymore on the v7 release, but we definitely see chances this gets into one of the next minor releases. There is an internal issue in our platform development repository representing this task. Thanks a lot for bringing this up @dadhi and @danielmarbach for spiking this already 👍 ❤️ |
you can do it like it is suggested on linq2db: https://github.com/linq2db/linq2db/pull/1277/files#diff-b68c5ca659d7b8d1503651f8140bb774R11 |
Hi jochen, We implemented it in the next minor of the 7.x release train. It will go out soonish Daniel |
We got pinged by Maksim Volkau (@dadhi) over twitter after publishing the optimization blog post and he asked whether we considered FastExpressionCompiler. I built the expression compiler into the perf suite.
PipelineOptimizations.zip
Test Harness used
TLDR
Compile()
withCompileFast()
FastExpressionCompiler
It can be included as internal source file and doesn't need to be referenced as a nuget package.
Execution
Warmup
Exception
The text was updated successfully, but these errors were encountered: