# FastExpressionCompiler

> Fast Compiler for C# Expression Trees and the lightweight LightExpression alternative. Diagnostic and code generation tools for the expressions.

- **URL**: https://www.freshcrate.ai/projects/FastExpressionCompiler
- **Author**: dadhi
- **Category**: Testing
- **Latest version**: `v5.4.1` (2026-04-13)
- **License**: MIT
- **Source**: https://github.com/dadhi/FastExpressionCompiler
- **Language**: C#
- **GitHub**: 1,359 stars, 94 forks
- **Registry**: github
- **Tags**: `benchmark`, `c#`, `closure`, `code-generation`, `compiler`, `delegate`, `delegates`, `dryioc`, `expression-tree`

## Description

Fast Compiler for C# Expression Trees and the lightweight LightExpression alternative. Diagnostic and code generation tools for the expressions.

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `v5.4.1` | 2026-04-13 | High | ## v5.4.1 Bug-fix release  - #498 System.InvalidProgramException when using loop - #499 System.InvalidProgramException for Sorting and comparison function  **Contributions**: @bluewingHuang  **Full Changelog**: https://github.com/dadhi/FastExpressionCompiler/compare/v5.4.0...v5.4.1 |
| `v5.4.0` | 2026-03-30 | Medium | ## v5.4.0 Feature and bug-fix release  ### Features  - #398 Optimize Switch with OpCodes.Switch   - #484 PrintIL options to output op-codes in the format directly copyable to AssertOpCodes method  - #482 [impl] Update to the modern optimized and fixed versions of ImTools SmallList and SmallMap  ### Fixes  - Multiple fixes in `ToCSharpString`, `PrintCSharp` - #480 "CLR detected an invalid program" exception - #483 fix recursive PrintIL output for Label Offset and Argument Ordinal - # |
| `v5.3.3` | 2025-10-31 | Low | ## v5.3.3 Bug-fix release (src packages only)  - fixed: #488 Fix warnings in src package |
| `v5.3.2` | 2025-10-22 | Low | ## v5.3.2 Bug-fix release (src packages only)  - fixed: #481 The 5.3.0 source package is broken and doesn't include all required source files |
| `v5.3.1` | 2025-10-21 | Low | ## v5.3.1 Bug-fix release (src packages only)  - fixed: #481 The 5.3.0 source package is broken and doesn't include all required source files |
| `v5.3.0` | 2025-06-10 | Low | ## v5.3.0 Feature release  - feat: [performance] Reuse the ILGenerator used by the nested lambda compilation  - feat: [performance] Reuse DynamicMethod if possible - feat: Add debug diagnostics to the nested lambdas - fix: System.ExecutionEngineException with nullables on repeated calls to ConcurrentDictionary  **Full Changelog**: https://github.com/dadhi/FastExpressionCompiler/compare/v5.2.0...v5.3.0 |
| `v5.2.0` | 2025-05-12 | Low | ## v5.2.0 Feature release  - feat: #466 Simplify creation of the updateable value that can be put into Closure with the Expression.ConstantRef - feat: #472 Interpreter to reduce the IL emitted by the Logical, Comparison, Arithmetics expressions, by calculating them during compile time and using the calculation result in IL - feat: Expose TestTools and FastExpressionCompiler.ILDecoder to enable testing and diagnostic in the consumer code |
| `v5.1.1` | 2025-04-02 | Low | ## v5.1.1. Bug-fix release  - fix: #461 InvalidProgramException when null checking type by ref - fix: #462 Optimize Equality comparison with null  **Full Changelog**: https://github.com/dadhi/FastExpressionCompiler/compare/v5.1.0...v5.1.1 |
| `v5.1.0` | 2025-03-31 | Low | ## v5.1.0 Small feature release  - add: #458 Add Support for TryFault - fix: #460 ArgumentException when converting from object to type with explicit operator  **Full Changelog**: https://github.com/dadhi/FastExpressionCompiler/compare/v5.0.3...v5.1.0 |
| `v5.0.3` | 2025-03-26 | Low | ## v5.0.3 Bug-fix release  - fix: #451 Operator implicit/explicit produces InvalidProgram - fix: #455 TypeAs should return null when it cannot cast to a nullable #455   **Full Changelog**: https://github.com/dadhi/FastExpressionCompiler/compare/v5.0.2...v5.0.3 |

## Dependency audit

- **Score**: 100/100
- **Total deps**: 0
- **Resolved**: 0
- **Unresolved**: 0
- **License conflicts**: 0
- **Warnings**: 0
- **Scanned**: 2026-04-27

## Citation

- HTML: https://www.freshcrate.ai/projects/FastExpressionCompiler
- Markdown: https://www.freshcrate.ai/projects/FastExpressionCompiler.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/FastExpressionCompiler/deps

_Generated by freshcrate.ai. Indexes github releases for AI-agent ecosystem packages._
