I´ve gained quite a bit of experience with the Java programming language, and very much agree with the accusation that its ecosystem is full of weird choices. Thank you, Mark Rheinhold, I guess. And because of those, other things that got made available got made weird too.
Seeing these benchmarks helps a lot and is quite refreshing: over on Medium, many a content writer regurgitates the same old "tips" without ever providing any benchmarks as proof, thus causing us to believe in fairy tales or continuing traditions for tradition sake, rather than for the benefit of an application.
Thank you for picking an article that includes benchmarks. That is worth repeating.
Interesting analysis, but the conclusion is a bit contrived.
People often prefer type safety over performance. When it doesn't impact type safety, they still prefer better performance over worse performance. That's not a contradiction.
You could argue that introducing the EnumSet-type isn't worth it for that, but I don't really see a disadvantage from having it.
Those who know about EnumSet, can use it. Those who don't know it, can continue to use HashSet. And if you don't know about EnumSet, but find one in a code base, it's not hard to guess what it does...
Yes, the performance of these structures is a concern for low-level computing, but in most cases (where the Java designers focused), they aim to make the developer's work more productive and readable (the responsibility for the efficiency and management of resources is delegated to the VM). Even so, analyzes of this type are important for people focused on the development of JVMs, where efficiency does play a truly critical role.