[#122900] [Ruby Bug#21529] Deprecate the /o modifier and warn against using it — "jpcamara (JP Camara) via ruby-core" <ruby-core@...>

Issue #21529 has been reported by jpcamara (JP Camara).

10 messages 2025/08/03

[#122925] [Ruby Feature#21533] Introduce `Time#am?` and `Time#pm?` — "matheusrich (Matheus Richard) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxNTMzIGhhcyBiZWVuIHJlcG9ydGVkIGJ5IG1hdGhldXNyaWNoIChNYXRoZXVzIFJp

10 messages 2025/08/06

[#122932] [Ruby Bug#21534] ppc64le Ractor ractor_port_receive aborted (core dumped) — "jaruga (Jun Aruga) via ruby-core" <ruby-core@...>

Issue #21534 has been reported by jaruga (Jun Aruga).

12 messages 2025/08/07

[#122953] [Ruby Bug#21540] prism allows `foo && return bar` when parse.y doesn't — "Earlopain (Earlopain _) via ruby-core" <ruby-core@...>

Issue #21540 has been reported by Earlopain (Earlopain _).

12 messages 2025/08/12

[#122964] [Ruby Feature#21543] Point ArgumentError to the call site — "mame (Yusuke Endoh) via ruby-core" <ruby-core@...>

Issue #21543 has been reported by mame (Yusuke Endoh).

8 messages 2025/08/14

[#122969] [Ruby Feature#21545] `#try_dig`: a dig that returns early if it cannot dig deeper — "cb341 (Daniel Bengl) via ruby-core" <ruby-core@...>

Issue #21545 has been reported by cb341 (Daniel Bengl).

10 messages 2025/08/15

[#122987] [Ruby Bug#21547] SEGV after 2083fa commit — "watson1978 (Shizuo Fujita) via ruby-core" <ruby-core@...>

Issue #21547 has been reported by watson1978 (Shizuo Fujita).

10 messages 2025/08/20

[#123042] [Ruby Feature#21550] Ractor.sharable_proc/sharable_lambda to make sharable Proc object — "ko1 (Koichi Sasada) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxNTUwIGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGtvMSAoS29pY2hpIFNhc2FkYSkuDQoN

16 messages 2025/08/21

[#123122] [Ruby Feature#21556] Add true? and false? methods to NilClass, TrueClass, FalseClass, and String — "Phalado (Raphael Cordeiro) via ruby-core" <ruby-core@...>

Issue #21556 has been reported by Phalado (Raphael Cordeiro).

9 messages 2025/08/29

[#123146] [Ruby Bug#21559] Unicode normalization nfd -> nfc -> nfd is not reversible — "tompng (tomoya ishida) via ruby-core" <ruby-core@...>

Issue #21559 has been reported by tompng (tomoya ishida).

8 messages 2025/08/31

[ruby-core:123111] [Ruby Bug#19288] Ractor JSON parsing significantly slower than linear parsing

From: "luke-gru (Luke Gruber) via ruby-core" <ruby-core@...>
Date: 2025-08-28 19:07:09 UTC
List: ruby-core #123111
Issue #19288 has been updated by luke-gru (Luke Gruber).

File json_parse_float.rb added
File json_parse_string.rb added

The situation with ractors has improved a lot since the last update to this thread. I encourage you to try out ruby master if you can.

```
Running benchmark "json_parse_float" (1/2)
+ /Users/luke/.rubies/master-release/bin/ruby -I harness-ractor /Users/luke/workspace/yjit-bench/benchmarks/ractor/json_parse_float.rb
JSON 2.13.2
r:   itr:   time
0    #1:  488ms
0    #2:  477ms
0    #3:  458ms
0    #4:  448ms
0    #5:  445ms
1    #1:  384ms
1    #2:  411ms
1    #3:  395ms
1    #4:  422ms
1    #5:  390ms
2    #1:  262ms
2    #2:  260ms
2    #3:  244ms
2    #4:  248ms
2    #5:  241ms
4    #1:  168ms
4    #2:  179ms
4    #3:  145ms
4    #4:  175ms
4    #5:  145ms
6    #1:  166ms
6    #2:  181ms
6    #3:  151ms
6    #4:  133ms
6    #5:  139ms
8    #1:  116ms
8    #2:  140ms
8    #3:  136ms
8    #4:  117ms
8    #5:  148ms
12   #1:  130ms
12   #2:  123ms
12   #3:  117ms
12   #4:  136ms
12   #5:  129ms
16   #1:  100ms
16   #2:  111ms
16   #3:   96ms
16   #4:  122ms
16   #5:   90ms
32   #1:  100ms
32   #2:   76ms
32   #3:  100ms
32   #4:   76ms
32   #5:   91ms

Running benchmark "json_parse_string" (2/2)
+ /Users/luke/.rubies/master-release/bin/ruby -I harness-ractor /Users/luke/workspace/yjit-bench/benchmarks/ractor/json_parse_string.rb

JSON 2.13.2
r:   itr:   time
0    #1:  116ms
0    #2:  130ms
0    #3:  121ms
0    #4:  126ms
0    #5:  128ms
1    #1:   91ms
1    #2:  117ms
1    #3:  102ms
1    #4:  101ms
1    #5:   97ms
2    #1:   70ms
2    #2:   83ms
2    #3:   64ms
2    #4:   65ms
2    #5:   80ms
4    #1:   58ms
4    #2:   57ms
4    #3:   58ms
4    #4:   60ms
4    #5:   60ms
6    #1:   55ms
6    #2:   77ms
6    #3:   75ms
6    #4:   57ms
6    #5:   58ms
8    #1:   64ms
8    #2:   61ms
8    #3:   58ms
8    #4:   56ms
8    #5:   61ms
12   #1:   57ms
12   #2:   54ms
12   #3:   55ms
12   #4:   55ms
12   #5:   57ms
16   #1:   49ms
16   #2:   59ms
16   #3:   74ms
16   #4:   53ms
16   #5:   55ms
32   #1:   52ms
32   #2:   53ms
32   #3:   44ms
32   #4:   51ms
32   #5:   51ms
```

----------------------------------------
Bug #19288: Ractor JSON parsing significantly slower than linear parsing
https://bugs.ruby-lang.org/issues/19288#change-114428

* Author: maciej.mensfeld (Maciej Mensfeld)
* Status: Closed
* ruby -v: ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-linux]
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
a simple benchmark:

```ruby
require 'json'
require 'benchmark'

CONCURRENT = 5
RACTORS = true
ELEMENTS = 100_000

data = CONCURRENT.times.map do
  ELEMENTS.times.map do
    {
      rand => rand,
      rand => rand,
      rand => rand,
      rand => rand
    }.to_json
  end
end

ractors = CONCURRENT.times.map do
  Ractor.new do
    Ractor.receive.each { JSON.parse(_1) }
  end
end

result = Benchmark.measure do
  if RACTORS
    CONCURRENT.times do |i|
      ractors[i].send(data[i], move: false)
    end

    ractors.each(&:take)
  else
    # Linear without any threads
    data.each do |piece|
      piece.each { JSON.parse(_1) }
    end
  end
end

puts result
```

Gives following results on my 8 core machine:

```shell
# without ractors:
  2.731748   0.003993   2.735741 (  2.736349)

# with ractors
12.580452   5.089802  17.670254 (  5.209755)
```
I would expect Ractors not to be two times slower on the CPU intense work.



---Files--------------------------------
json_parse_float.rb (727 Bytes)
json_parse_string.rb (1.22 KB)


-- 
https://bugs.ruby-lang.org/
______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/


In This Thread