General

Profile

andrey.samsonov@gmail.com (Andrey Samsonov)

  • Login: andrey.samsonov@gmail.com
  • Registered on: 08/09/2020
  • Last sign in: 08/14/2026

Issues

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

Activity

08/14/2026

03:41 PM Ruby Feature #22245 (Open): Reduce Array#& cost when self is much shorter than the argument
# Abstract
For intersections of larger arrays, Ruby builds a temporary hash from the argument to `Array#&`. As a result, `short & long` can be slower and use much more temporary memory than `long & short`. Callers cannot always choose...
andrey.samsonov@gmail.com (Andrey Samsonov)

08/10/2020

12:27 PM Ruby Feature #17109: Eliminate the performance impact of operands' order in array's | and &
> > The order is preserved from the original array.
My bad, I missed the comment. In this case, I think the optimisation is not worth a change in the spec.
andrey.samsonov@gmail.com (Andrey Samsonov)

08/09/2020

09:52 PM Ruby Feature #17109 (Rejected): Eliminate the performance impact of operands' order in array's | and &
When I do intersection (`a & b`) or union (`a | b`), usually the array in one position is more likely longer than the one in the other position. I always try to remember in what order I should write `a` and` b` for the best performance. ... andrey.samsonov@gmail.com (Andrey Samsonov)

Also available in: Atom