Skip to content

FastExpressionCompiler

chaowlert edited this page Feb 2, 2020 · 4 revisions

Need more speed? Let's compile with FastExpressionCompiler.

Getting the package

 PM> Install-Package FastExpressionCompiler

Then add following code on start up

TypeAdapterConfig.GlobalSettings.Compiler= exp =>exp.CompileFast();

That's it. Now your code will enjoy performance boost. Here is result.

MethodMeanStdDevErrorGen 0Gen 1Gen 2Allocated
'Mapster 4.1.1'115.31 ms0.849 ms1.426 ms31000.0000--124.36 MB
'Mapster 4.1.1 (FEC)'54.70 ms1.023 ms1.546 ms29600.0000--118.26 MB

Clone this wiki locally