[#77789] [Ruby trunk Feature#12012] Add Boolean method — prodis@...
Issue #12012 has been updated by Fernando Hamasaki de Amorim.
4 messages
2016/10/27
[ruby-core:77829] [Ruby trunk Feature#12810][Assigned] Improve `Set#find_index` performance
From:
shyouhei@...
Date:
2016-10-31 04:04:40 UTC
List:
ruby-core #77829
Issue #12810 has been updated by Shyouhei Urabe. Status changed from Open to Assigned Assignee set to Akinori MUSHA Seems a design issue. Let me assign this to the library's maintainer. ---------------------------------------- Feature #12810: Improve `Set#find_index` performance https://bugs.ruby-lang.org/issues/12810#change-61135 * Author: Thomas Charbonnel * Status: Assigned * Priority: Normal * Assignee: Akinori MUSHA ---------------------------------------- Hello everyone! I've toyed a bit with the `Set` class lately and have found some performance issues with method `find_index`. Github gist here: https://gist.github.com/thomascharbonnel/f023ca137f2b2b7021cbe2d580485cd4 I'm thinking it would be possible to add an index as default value for each new item of `Set` (instead of a boolean like now), `find_index` would then be executed in O(1). I can attach a patch in a few days if everybody is cool with the idea. Thanks! Thomas. -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>