Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added prototype of allocation free Match method (#146)
There is a simple Match method, which by design consumes 130x more CPU and allocates 48 bytes with each call. I strongly recommend to document this behavior or add implementation for simple transformation, which directly returns mapped value. As you can see in this code, which si more as prototype or documentation, than real improvement, it is feasible to reduce the method overhead. Recommendations: * Equal method in the function buddy causes boxing to object e.g. allocations * When delegate is not needed to transform result, than simple overload can be used * != is no longer recommended way for null comparison, since it can be overloaded, use "is not null" instead Not expecting this PR to be merged, should be used as reference only.
- Loading branch information