• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lloydmeta / enumeratum / 746 / 2
100%
master: 89%

Build:
Build:
LAST BUILD BRANCH: dependency-notes
DEFAULT BRANCH: master
Ran 07 Feb 2017 03:02AM UTC
Files 44
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Feb 2017 02:50AM UTC coverage: 100.0%. First build
746.2

push

travis-ci

lloydmeta
Add containsAll/subSetOf comparisons

Results
-------
[info] Benchmark                                         Mode  Cnt   Score   Error  Units
[info] SetComparisons.enumeratumScalaSetSubsetOffSmall   avgt   30   9.248 ± 0.109  ns/op
[info] SetComparisons.enumeratumScalaSetSubsetOffMedium  avgt   30  29.358 ± 0.287  ns/op
[info] SetComparisons.enumeratumScalaSetSubsetOffAll     avgt   30   2.469 ± 0.012  ns/op
[info] SetComparisons.jEnumEnumSetContainsAllSmall       avgt   30   3.888 ± 0.953  ns/op
[info] SetComparisons.jEnumEnumSetContainsAllMedium      avgt   30   3.457 ± 0.127  ns/op
[info] SetComparisons.jEnumEnumSetContainsAllAll         avgt   30   3.321 ± 0.827  ns/op

Discussion
----------
As expected, we have O(m) for subset checking on a hash of m elements against one of n elements.
Looking at the source code confirms that we are doing a forall check ;) Funnily enough, subset
check when the sets contain exactly the same elements is crazy fast (!), beating out EnumSet.

EnumSet really shines here because of its ability to do a bitwise AND operation, fulfilling its
O(1) promise.

The ability to do a constain time, fast subset check makes it worthwhile considering a similar
EnumSet for Enumeratum (backed by an bitrep of member indices).

402 of 402 relevant lines covered (100.0%)

1.0 hits per line

Source Files on job 746.2
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 746
  • Travis Job 746.2
  • d0e1d319 on github
  • Next Job for on benchmarks/more-enumset-comps (#748.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc