mirror of
https://github.com/inspec/inspec
synced 2024-11-23 21:23:29 +00:00
ad6ffcccd6
Having a ton of conditions with `%w{one-string}.include?(platform)` is incredibly wasteful and slow. Apparently about 17x slower: ``` Calculating ------------------------------------- include_eh 529.315k (± 3.2%) i/s - 2.675M in 5.058296s include_or_eq 909.795k (± 1.5%) i/s - 4.568M in 5.022491s case_when 9.043M (± 2.8%) i/s - 45.443M in 5.029499s Comparison: case_when: 9042590.3 i/s include_or_eq: 909795.2 i/s - 9.94x slower include_eh: 529315.0 i/s - 17.08x slower ``` Signed-off-by: Ryan Davis <zenspider@chef.io> |
||
---|---|---|
.. | ||
bundles | ||
inspec | ||
matchers | ||
plugins | ||
resource_support | ||
resources | ||
source_readers | ||
inspec.rb |