SwensenSoftware / unquote

Write F# unit test assertions as quoted expressions, get step-by-step failure messages for free
http://www.swensensoftware.com/unquote
Apache License 2.0
287 stars 25 forks source link

Implement custom reflection-based evaluation engine #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This will give us many benefits over dependence on PowerPack's quotation 
evaluation
  1. Faster
  2. Simpler and therefore less bug prone
  3. Allow us to support expressions which PowerPack doesn't / can't support like VarSet, PropertySet, FieldSet, and ForIntegerLoop
  4. Remove dependency on FSharp.PowerPack.Linq

Original issue reported on code.google.com by stephen....@gmail.com on 30 Jun 2011 at 1:48

GoogleCodeExporter commented 9 years ago
First version will be included in upcoming Unquote version 2.0.0 and includes 
support for all quotation expressions except Quote, NewDelegate, LetRecursive, 
AddressSet, and AddressOf (more than PowerPack's eval). 

Typical performance increases range from 4 to 40 times PowerPack's 
non-pre-compiled eval. The later can be seen with evaluation of core operator 
expressions, where our evaluation engine uses a large set of custom native 
implementations (both for the performance increase, and because many core 
operators have no dynamic implementations). The former is a typical reflection 
invocation scenario.

With our custom evaluation engine we have immediately seen 3 times increase in 
execution of our own suite of unit tests (which uses itself for testing).

In addition to the 100+ unit tests specifically written for our evaluation 
engine, we are duly satisfied by the additional 200+ unit tests for 
decompilation and reduction processing for unquote which in turn relied on our 
new evaluation which revealed only a couple of bugs in our initial 
implementation.

Original comment by stephen....@gmail.com on 30 Jun 2011 at 1:59

GoogleCodeExporter commented 9 years ago

Original comment by stephen....@gmail.com on 7 Jul 2011 at 3:39