rspec/rspec-core — comment on commit d8af26ebbd10bbe65182ff4aa4e575cdfa779386
File:  line 0
By myronmarston:

* We should `require 'set'` somewhere in rspec-core. It's part of the stdlib and isn't loaded by default. I bet things are passing here because there is a `require 'set'` in rspec-expectations now (due to my commit last night), but we shouldn't depend on that.
* If you look at the benchmarks closely, you'll notice that that `Set#include?` is not universally faster than `Array#include?`. I suspected this, but wasn't sure until I benchmarked it. `Array#include?` is faster when given the first or second item in the list; `Set#include?` is very slightly faster when given the 3rd item in the list; and after that, set remains faster. It makes sense if you think about it: a linear scan that finds the requested item in the first or second position can be quite fast (and faster then going through the hashing business set does). So, I think that the `BOOLEAN_FILERS`, `STANDALONE_FILTERS` and `SCOPES` will be faster as arrays because they are so small. `NON_FORCED_OPTIONS` is big enough that it will get the benefits of being a set.