[#89806] [Ruby trunk Bug#15306] Generate prelude.c using miniruby — v.ondruch@...
Issue #15306 has been reported by vo.x (Vit Ondruch).
3 messages
2018/11/15
[ruby-core:89696] [Ruby trunk Feature#15281] Speed up Set#intersect with size check.
From:
RedGreenBlueDiamond@...
Date:
2018-11-03 13:08:33 UTC
List:
ruby-core #89696
Issue #15281 has been reported by RGBD (Oleg Zubchenko). ---------------------------------------- Feature #15281: Speed up Set#intersect with size check. https://bugs.ruby-lang.org/issues/15281 * Author: RGBD (Oleg Zubchenko) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- Current implementation computes set intersection s1 & s2 in O(s1.size) time. It can be reduced to O([s1.size, s2.size].min) time. Additional speedup comes from using #each instead of #do_with_enum. See files attached for benchmarks. [Pull Request](https://github.com/ruby/ruby/pull/2003) ---Files-------------------------------- intersect.rb (1.91 KB) intersect_standalone.rb (671 Bytes) -- 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>