From: hanmac@... Date: 2019-07-27T07:09:10+00:00 Subject: [ruby-core:93945] [Ruby master Bug#16026] `Set#count` performance issues Issue #16026 has been updated by Hanmac (Hans Mackowiak). technically `Set#count` comes from `Enumerable`, where it has support for this too ``` enum.count(item) -> int enum.count { |obj| block } -> int ``` so i don't think Set should make `#count` work like `#size` ---------------------------------------- Bug #16026: `Set#count` performance issues https://bugs.ruby-lang.org/issues/16026#change-80131 * Author: ioquatix (Samuel Williams) * Status: Open * Priority: Normal * Assignee: knu (Akinori MUSHA) * Target version: * ruby -v: * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- `Set#size` is O(1), but `Set#count` is O(N). I would like to add `alias count size` to `class Set` Is it okay? -- https://bugs.ruby-lang.org/ Unsubscribe: