Skip to content

Consider FastExpressionCompiler for compiling lambda expressions. #542

@fiseni

Description

@fiseni

For the in-memory operations, we're compiling the lambda expressions we have in the spec. The built-in Expression.Compile() is quite slow and memory intensive.

The FastExpressionCompiler NuGet package offers faster compilation and allocates less memory. For a long time, I've been in doubt whether we should introduce this dependency or not. The hesitation is based on:

  • It emits IL code. I'm sure the author has done a great job, but emitting IL is always error prone, too many edge cases (at least in my experience).
  • Not all node types are supported. Are we sure these nodes will never be used in our case?

Perhaps we may check and fallback to built-in Compile? What is the overhead of all those checks? Anyhow, let's consider this and do some preliminary tests.

Related to #541

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions