EyalAr/Decree — pull request #4 by Xorcerer (2014-12-20 16:39:28+00:00)
Title: Optimization

Just failed to figure an algo to handle the scenario "optional arguments before the required arguments".
So I made a minimal change to approach the optimization I figured out so far.
No refactoring that I have discuss with you before, because it is not necessary.

In my Mac:

*Before*

judge 10000 times with an error handling callback
with legal arguments
✓ should be ok (51ms)
with illegal arguments
✓ should call handler with an error (132ms)

*After*

judge 10000 times with an error handling callback
with legal arguments
✓ should be ok (38ms)
with illegal arguments
✓ should call handler with an error (126ms)