-
Notifications
You must be signed in to change notification settings - Fork 82
Refactor validator strategies + Add ability to override validators #159
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Refactor validator strategies + Add ability to override validators #159
Conversation
@@ -0,0 +1,96 @@ | |||
module Contracts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method was just moved.
Neat! This is much better. Did you notice any speed difference with this change? |
There is no speed difference with our current benchmarks. But given a thought to it, I think this may cause a slowdown for |
554e81f
to
13545c4
Compare
I have pushed benchmark itself right into master (no-op code).
This branch:
Yes, as expected there is a bit of slowdown here. All contracts that call to |
Ok, now it is even faster than master (I actually expected that) :)
|
Contracts that don't call to |
693c9a0
to
88375aa
Compare
Green on travis and faster than on master :) What can be better? :D |
oh, awesome! |
merging :) |
Refactor validator strategies + Add ability to override validators
Excellent! |
#call_with
to its own module, without any changes to it..make_validator
in its own module.Contract.make_validator
faster by memoizingfixes #150
fixes #156
Example code for overriding
:class
strategy:@robnormal What do you think, can you use this kind of overriding mechanism?
/cc @egonSchiele Can you take a look at this one?