News for hackers. Stuff that matters.
Re:A single character code change by nradov on Thursday January 02, 2020 @01:07PM (#21937932)
The Java standard library also includes an empty set field, so as a performance optimization it's sometimes worth checking if your set will always be empty first and using that rather than instantiating a new HashSet at all.

https://docs.oracle.com/en/java/javase/13/docs/api/java.base...

Re:A single character code change by merb on Thursday January 02, 2020 @02:49PM (#21939023)
well the empty set is itself immutable, so depending on the code base the new HashSet(0) was less code.