Open kml opened 8 years ago
Benchmark code: https://gist.github.com/kml/0fb1588fc1b6ba4c60fa While testing on JRuby I'm gaining at least x2 improvement thanks to defining method.
Other solution (maybe even better) could be to staticaly define methods like:
module Coercible class Coercer class Object def to_object(value) value end def to_boolean(value) value end end end end
Benchmark code: https://gist.github.com/kml/0fb1588fc1b6ba4c60fa While testing on JRuby I'm gaining at least x2 improvement thanks to defining method.
Other solution (maybe even better) could be to staticaly define methods like: