[#107008] [Ruby master Bug#18465] Make `IO#write` atomic. — "ioquatix (Samuel Williams)" <noreply@...>
Issue #18465 has been reported by ioquatix (Samuel Williams).
16 messages
2022/01/09
[#107150] [Ruby master Feature#18494] [RFC] ENV["RUBY_GC_..."]= changes GC parameters dynamically — "ko1 (Koichi Sasada)" <noreply@...>
Issue #18494 has been updated by ko1 (Koichi Sasada).
4 messages
2022/01/17
[#107170] Re: [Ruby master Feature#18494] [RFC] ENV["RUBY_GC_..."]= changes GC parameters dynamically
— Eric Wong <normalperson@...>
2022/01/17
> https://bugs.ruby-lang.org/issues/18494
[#107302] [Ruby master Bug#18553] Memory leak on compiling method call with kwargs — "ibylich (Ilya Bylich)" <noreply@...>
Issue #18553 has been reported by ibylich (Ilya Bylich).
4 messages
2022/01/27
[#107346] [Ruby master Misc#18557] DevMeeting-2022-02-17 — "mame (Yusuke Endoh)" <noreply@...>
Issue #18557 has been reported by mame (Yusuke Endoh).
18 messages
2022/01/29
[ruby-core:107379] [Ruby master Feature#18515] Add Range#reverse_each implementation for performance
From:
"kyanagi (Kouhei Yanagita)" <noreply@...>
Date:
2022-01-31 02:23:10 UTC
List:
ruby-core #107379
Issue #18515 has been updated by kyanagi (Kouhei Yanagita).
Dan0042 (Daniel DeLorme) wrote in #note-3:
> I agree with both of those statements, but Integer is the only class that has #pred, so in practice "using pred" and "specialized implementation for Integer" are the same thing.
Yes, that is exactly what you said.
If I propose `#pred`-based `Range#reverse_each`, I will propose `Date#pred` too.
To find out my PR implementation (iterating integers directly) is worthwhile even if a `#pred`-based implementation is introduced,
we will need to measure the performance. I'll try it later.
----------------------------------------
Feature #18515: Add Range#reverse_each implementation for performance
https://bugs.ruby-lang.org/issues/18515#change-96281
* Author: kyanagi (Kouhei Yanagita)
* Status: Open
* Priority: Normal
----------------------------------------
PR is https://github.com/ruby/ruby/pull/5489
Current `Range#reverse_each` uses `Enumerable#reverse_each` which is implemented with `#to_a`.
So we are virtually not able to use `reverse_each` for a very large or beginless range, even if few elements are iterated on actually.
```
(1..2**100).reverse_each { |x| p x; break if x.odd? }
(..5).reverse_each { |x| p x; break if x == 0 }
(1..2**32).reverse_each.lazy.select { |x| Prime.prime?(x) }.take(3).to_a
```
This patch, implements `Range#reverse_each` for Integer elements, enables these examples.
I think `#reverse_each` for an endless range should raise an exception.
This is a different issue, so I'll create another ticket later.
-> posted: https://bugs.ruby-lang.org/issues/18551
--
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>