fsprojects/FSharp.Quotations.Evaluator — pull request #5 by manofstick (2014-11-13 10:19:23+00:00)
Title: Performance improvements

Fixed a number of issues with performance.

Project:
- Added a mechanism using [ReflectedDefintion] that compares both output results and times of properly compiled code and linq compiled code. Added a "Performance" project configuration to run the time portion of these tests (it always runs the comparison code)

Expression Tree Creation:
- Very slow when capturing state in Expression.Lambda calls; so compiled Expression.Lambdas individually and stored in objects which included captured state
- Performance of basic operators was very slow because custom method was provided so I skip that in case of primitive types
- Using Blocks in a couple more places

Analysis Time:
- DerivedPatterns.SpecificCall was v. slow, so removed
- A few other Expr tree manipulations; removing |> and |< and then fixing resultant tree
- Removing op_Range and op_RangeStep as the offered functions are v. slow

Now in many cases get close to compile time speeds (so this library is actually semi-useable!), but could still do with another full round of examination as I know I have left holes, as well as missing functionality (recursive functions to name one big hole that I haven't peered down yet). Hopefully I'll make some time; but I'm pretty burnt out at the moment.