ruby-protobuf / protobuf

A pure ruby implementation of Google's Protocol Buffers
https://github.com/ruby-protobuf
MIT License
463 stars 101 forks source link

move dynamic rule checks to the initialize method #363

Closed abrandoned closed 7 years ago

abrandoned commented 7 years ago

tested in MRI and JRuby and instance variable checks are approx 10% faster than the rule comparison on each repeated? required? calls, since this is called a lot (during serialization) figured this would be better to use the faster path

@film42