General

Profile

RGBD (Oleg Zubchenko)

  • Login: RGBD
  • Registered on: 11/03/2018
  • Last sign in: 11/03/2018

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 0 1

Activity

12/31/2019

11:52 AM Ruby Revision 4ce28b58 (git): speed up set intersect
RGBD (Oleg Zubchenko)

11/03/2018

05:10 PM Ruby Feature #15281: Speed up Set#intersect with size check.
marcandre (Marc-Andre Lafortune) wrote:
> Thanks for the patch.
> ...
Where in the documentation can I read that?
[this](https://ruby-doc.org/stdlib-2.5.3/libdoc/set/rdoc/Set.html#method-i-to_a) says order is uncertain. I thought it...
RGBD (Oleg Zubchenko)
01:08 PM Ruby Feature #15281 (Assigned): Speed up Set#intersect with size check.
Current implementation computes set intersection s1 & s2 in O(s2.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 benchmark...
RGBD (Oleg Zubchenko)

Also available in: Atom