[#101174] [Ruby master Bug#17359] Ractor copy mode is not Ractor-safe — marcandre-ruby-core@...

Issue #17359 has been reported by marcandre (Marc-Andre Lafortune).

17 messages 2020/12/01

[#101217] [Ruby master Feature#17363] Timeouts — marcandre-ruby-core@...

Issue #17363 has been reported by marcandre (Marc-Andre Lafortune).

19 messages 2020/12/03

[#101250] [Ruby master Bug#17369] Introduce non-blocking `Process.wait`, `Kernel.system` and related methods. — samuel@...

Issue #17369 has been reported by ioquatix (Samuel Williams).

12 messages 2020/12/05

[#101276] [Ruby master Bug#17373] Ruby 3.0 is slower at Discourse bench than Ruby 2.7 — sam.saffron@...

Issue #17373 has been reported by sam.saffron (Sam Saffron).

11 messages 2020/12/07

[#101278] [Ruby master Bug#17374] Refined methods aren't visible from a refinementRefinements that include/prepend module — marcandre-ruby-core@...

Issue #17374 has been reported by marcandre (Marc-Andre Lafortune).

17 messages 2020/12/07

[#101317] [Ruby master Feature#17378] Ractor#receive with filtering like other actor langauge — ko1@...

Issue #17378 has been reported by ko1 (Koichi Sasada).

9 messages 2020/12/08

[#101343] [Ruby master Bug#17382] Segfault in String#inspect — lionel.perrin@...

Issue #17382 has been reported by lionelperrin (Lionel Perrin).

10 messages 2020/12/09

[#101381] [Ruby master Bug#17385] Test failures on gcc 11 — jaruga@...

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

18 messages 2020/12/10

[#101458] [Ruby master Bug#17394] TCPServer is not thread safe on win32 — aladjev.andrew@...

Issue #17394 has been reported by puchuu (Andrew Aladjev).

9 messages 2020/12/14

[#101472] [Ruby master Feature#17397] shareable_literal_constant should check at runtime, not at parse time — marcandre-ruby-core@...

Issue #17397 has been reported by marcandre (Marc-Andre Lafortune).

10 messages 2020/12/16

[#101475] [Ruby master Bug#17398] SyntaxError in endless method — zverok.offline@...

Issue #17398 has been reported by zverok (Victor Shepelev).

15 messages 2020/12/16

[#101477] [Ruby master Misc#17399] Are endless methods experimental? — zverok.offline@...

Issue #17399 has been reported by zverok (Victor Shepelev).

13 messages 2020/12/16

[#101480] [Ruby master Bug#17400] Incorrect character downcase for Greek Sigma — xfalcox@...

Issue #17400 has been reported by xfalcox (Rafael Silva).

10 messages 2020/12/16

[#101513] [Ruby master Bug#17405] irb ---nomultiline gets exception when output contains some non-ascii characters — rsharman@...

Issue #17405 has been reported by rsharman (Richard Sharman).

8 messages 2020/12/18

[#101534] [Ruby master Bug#17409] Endless range of dates stuck on include? when miss — sergey.gnuskov@...

Issue #17409 has been reported by gsmetal (Sergey G).

9 messages 2020/12/19

[#101546] [Ruby master Bug#17411] Syntax error with . in pattern — zverok.offline@...

Issue #17411 has been reported by zverok (Victor Shepelev).

10 messages 2020/12/19

[#101598] [Ruby master Bug#17420] Unsafe mutation of $" when doing non-RubyGems require in Ractor — eregontp@...

Issue #17420 has been reported by Eregon (Benoit Daloze).

12 messages 2020/12/21

[#101635] [Ruby master Bug#17428] Method#inspect bad output for class methods — marcandre-ruby-core@...

Issue #17428 has been reported by marcandre (Marc-Andre Lafortune).

13 messages 2020/12/23

[#101639] [Ruby master Bug#17429] Prohibit include/prepend in refinement modules — shugo@...

Issue #17429 has been reported by shugo (Shugo Maeda).

32 messages 2020/12/23

[#101707] [Ruby master Feature#17472] HashWithIndifferentAccess like Hash extension — naruse@...

Issue #17472 has been reported by naruse (Yui NARUSE).

31 messages 2020/12/26

[#101710] [Ruby master Feature#17473] Make Pathname to embedded class of Ruby — hsbt@...

Issue #17473 has been reported by hsbt (Hiroshi SHIBATA).

28 messages 2020/12/26

[#101719] [Ruby master Feature#17474] Interpreting constants at compile time — jzakiya@...

Issue #17474 has been reported by jzakiya (Jabari Zakiya).

23 messages 2020/12/26

[#101735] [Ruby master Misc#17480] DevelopersMeeting20210113Japan — mame@...

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

12 messages 2020/12/27

[#101790] [Ruby master Bug#17486] Build fails on darwin due to libtool being removed — dark.panda@...

Issue #17486 has been reported by dark.panda (J Smith).

11 messages 2020/12/28

[#101794] [Ruby master Bug#17488] Regression in Ruby 3: Hash#key? is non-deterministic when argument uses DelegateClass — myron.marston@...

Issue #17488 has been reported by myronmarston (Myron Marston).

11 messages 2020/12/28

[#101809] [Ruby master Feature#17490] Rename RubyVM::MJIT to RubyVM::JIT — takashikkbn@...

Issue #17490 has been reported by k0kubun (Takashi Kokubun).

15 messages 2020/12/30

[#101838] [Ruby master Feature#17496] Add constant Math::TAU — jzakiya@...

Issue #17496 has been reported by jzakiya (Jabari Zakiya).

32 messages 2020/12/31

[#101840] [Ruby master Bug#17497] Ractor performance issue — marcandre-ruby-core@...

Issue #17497 has been reported by marcandre (Marc-Andre Lafortune).

21 messages 2020/12/31

[ruby-core:101329] [Ruby master Bug#17373] Ruby 3.0 is slower at Discourse bench than Ruby 2.7

From: sam.saffron@...
Date: 2020-12-09 05:41:23 UTC
List: ruby-core #101329
Issue #17373 has been updated by sam.saffron (Sam Saffron).


I made this tiny script, which you can use to test (in the branch in the first post)

```
#!/usr/bin/env ruby
# frozen_string_literal: true

ENV['RAILS_ENV'] = 'profile'

require File.expand_path("../../config/environment", __FILE__)

def make_request
  req = {
    "REQUEST_METHOD" => "GET",
    "SCRIPT_NAME" => "",
    "PATH_INFO" => "/",
    "QUERY_STRING" => "",
    "SERVER_NAME" => "127.0.0.1",
    "SERVER_PORT" => "80",
    "REQUEST_PATH" => "/",
    "REMOTE_ADDR" => "127.0.0.1",
    "HTTP_VERSION" => "HTTP/1.0",
    "rack.input" => StringIO.new(""),
    "rack.version" => [1, 2],
    "rack.url_scheme" => "http"
  }

  Rails.application.call(req)
end

10.times do
  make_request
end

3.times do
  GC.start(full_mark: true, immediate_sweep: true)
end

start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
RubyVM.reset_debug_counters
make_request
RubyVM.show_debug_counters
elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start

puts "Duration was #{elapsed}"
gets

```

Results for 2.7 are:


```

[RUBY_DEBUG_COUNTER]	417420 method call
[RUBY_DEBUG_COUNTER]	mc_inline_hit                 	      407,308
[RUBY_DEBUG_COUNTER]	mc_inline_miss                	       17,502
[RUBY_DEBUG_COUNTER]	mc_global_hit                 	       86,554
[RUBY_DEBUG_COUNTER]	mc_global_miss                	          207
[RUBY_DEBUG_COUNTER]	mc_global_state_miss          	        2,762
[RUBY_DEBUG_COUNTER]	mc_class_serial_miss          	       14,740
[RUBY_DEBUG_COUNTER]	mc_cme_complement             	       10,191
[RUBY_DEBUG_COUNTER]	mc_cme_complement_hit         	       10,191
[RUBY_DEBUG_COUNTER]	mc_search_super               	        2,770
[RUBY_DEBUG_COUNTER]	mc_miss_by_nome               	            0
[RUBY_DEBUG_COUNTER]	mc_miss_by_distinct           	       10,348
[RUBY_DEBUG_COUNTER]	mc_miss_by_refine             	            0
[RUBY_DEBUG_COUNTER]	mc_miss_by_visi               	          218
[RUBY_DEBUG_COUNTER]	mc_miss_spurious              	        6,936
[RUBY_DEBUG_COUNTER]	mc_miss_reuse_call            	        2,245
[RUBY_DEBUG_COUNTER]	ccf_general                   	       16,704
[RUBY_DEBUG_COUNTER]	ccf_iseq_setup                	       43,129
[RUBY_DEBUG_COUNTER]	ccf_iseq_setup_0start         	        1,055
[RUBY_DEBUG_COUNTER]	ccf_iseq_setup_tailcall_0start	            0
[RUBY_DEBUG_COUNTER]	ccf_iseq_fix                  	      134,778
[RUBY_DEBUG_COUNTER]	ccf_iseq_opt                  	       14,039
[RUBY_DEBUG_COUNTER]	ccf_iseq_kw1                  	          124
[RUBY_DEBUG_COUNTER]	ccf_iseq_kw2                  	          195
[RUBY_DEBUG_COUNTER]	ccf_cfunc                     	      139,250
[RUBY_DEBUG_COUNTER]	ccf_ivar                      	       51,208
[RUBY_DEBUG_COUNTER]	ccf_attrset                   	          698
[RUBY_DEBUG_COUNTER]	ccf_method_missing            	          524
[RUBY_DEBUG_COUNTER]	ccf_zsuper                    	            0
[RUBY_DEBUG_COUNTER]	ccf_bmethod                   	       18,238
[RUBY_DEBUG_COUNTER]	ccf_opt_send                  	        8,025
[RUBY_DEBUG_COUNTER]	ccf_opt_call                  	          857
[RUBY_DEBUG_COUNTER]	ccf_opt_block_call            	            0
[RUBY_DEBUG_COUNTER]	ccf_super_method              	       13,155
[RUBY_DEBUG_COUNTER]	frame_push                    	      392,112
[RUBY_DEBUG_COUNTER]	frame_push_method             	      193,320
[RUBY_DEBUG_COUNTER]	frame_push_block              	       35,436
[RUBY_DEBUG_COUNTER]	frame_push_class              	            0
[RUBY_DEBUG_COUNTER]	frame_push_top                	            0
[RUBY_DEBUG_COUNTER]	frame_push_cfunc              	      159,590
[RUBY_DEBUG_COUNTER]	frame_push_ifunc              	        3,764
[RUBY_DEBUG_COUNTER]	frame_push_eval               	            0
[RUBY_DEBUG_COUNTER]	frame_push_rescue             	            2
[RUBY_DEBUG_COUNTER]	frame_push_dummy              	            0
[RUBY_DEBUG_COUNTER]	frame_R2R                     	      204,735
[RUBY_DEBUG_COUNTER]	frame_R2C                     	      148,739
[RUBY_DEBUG_COUNTER]	frame_C2C                     	       14,615
[RUBY_DEBUG_COUNTER]	frame_C2R                     	       24,023
[RUBY_DEBUG_COUNTER]	ivar_get_ic_hit               	      105,173
[RUBY_DEBUG_COUNTER]	ivar_get_ic_miss              	       20,240
[RUBY_DEBUG_COUNTER]	ivar_get_ic_miss_serial       	       28,221
[RUBY_DEBUG_COUNTER]	ivar_get_ic_miss_unset        	       11,963
[RUBY_DEBUG_COUNTER]	ivar_get_ic_miss_noobject     	            0
[RUBY_DEBUG_COUNTER]	ivar_set_ic_hit               	       10,802
[RUBY_DEBUG_COUNTER]	ivar_set_ic_miss              	       13,473
[RUBY_DEBUG_COUNTER]	ivar_set_ic_miss_serial       	        8,262
[RUBY_DEBUG_COUNTER]	ivar_set_ic_miss_unset        	            4
[RUBY_DEBUG_COUNTER]	ivar_set_ic_miss_oorange      	        3,924
[RUBY_DEBUG_COUNTER]	ivar_set_ic_miss_noobject     	        1,283
[RUBY_DEBUG_COUNTER]	ivar_get_base                 	       21,572
[RUBY_DEBUG_COUNTER]	ivar_set_base                 	       13,494
[RUBY_DEBUG_COUNTER]	lvar_get                      	      355,050
[RUBY_DEBUG_COUNTER]	lvar_get_dynamic              	       40,160
[RUBY_DEBUG_COUNTER]	lvar_set                      	       78,325
[RUBY_DEBUG_COUNTER]	lvar_set_dynamic              	        1,252
[RUBY_DEBUG_COUNTER]	lvar_set_slowpath             	          101
[RUBY_DEBUG_COUNTER]	gc_count                      	            0
[RUBY_DEBUG_COUNTER]	gc_minor_newobj               	            0
[RUBY_DEBUG_COUNTER]	gc_minor_malloc               	            0
[RUBY_DEBUG_COUNTER]	gc_minor_method               	            0
[RUBY_DEBUG_COUNTER]	gc_minor_capi                 	            0
[RUBY_DEBUG_COUNTER]	gc_minor_stress               	            0
[RUBY_DEBUG_COUNTER]	gc_major_nofree               	            0
[RUBY_DEBUG_COUNTER]	gc_major_oldgen               	            0
[RUBY_DEBUG_COUNTER]	gc_major_shady                	            0
[RUBY_DEBUG_COUNTER]	gc_major_force                	            0
[RUBY_DEBUG_COUNTER]	gc_major_oldmalloc            	            0
[RUBY_DEBUG_COUNTER]	gc_isptr_trial                	            0
[RUBY_DEBUG_COUNTER]	gc_isptr_range                	            0
[RUBY_DEBUG_COUNTER]	gc_isptr_align                	            0
[RUBY_DEBUG_COUNTER]	gc_isptr_maybe                	            0
[RUBY_DEBUG_COUNTER]	obj_newobj                    	       58,178
[RUBY_DEBUG_COUNTER]	obj_newobj_slowpath           	        1,517
[RUBY_DEBUG_COUNTER]	obj_newobj_wb_unprotected     	          877
[RUBY_DEBUG_COUNTER]	obj_free                      	            0
[RUBY_DEBUG_COUNTER]	obj_promote                   	            0
[RUBY_DEBUG_COUNTER]	obj_wb_unprotect              	            0
[RUBY_DEBUG_COUNTER]	obj_obj_embed                 	            0
[RUBY_DEBUG_COUNTER]	obj_obj_transient             	            0
[RUBY_DEBUG_COUNTER]	obj_obj_ptr                   	            0
[RUBY_DEBUG_COUNTER]	obj_str_ptr                   	            0
[RUBY_DEBUG_COUNTER]	obj_str_embed                 	            0
[RUBY_DEBUG_COUNTER]	obj_str_shared                	            0
[RUBY_DEBUG_COUNTER]	obj_str_nofree                	            0
[RUBY_DEBUG_COUNTER]	obj_str_fstr                  	            0
[RUBY_DEBUG_COUNTER]	obj_ary_embed                 	            0
[RUBY_DEBUG_COUNTER]	obj_ary_transient             	            0
[RUBY_DEBUG_COUNTER]	obj_ary_ptr                   	            1
[RUBY_DEBUG_COUNTER]	obj_ary_extracapa             	            0
[RUBY_DEBUG_COUNTER]	obj_ary_shared_create         	           81
[RUBY_DEBUG_COUNTER]	obj_ary_shared                	            0
[RUBY_DEBUG_COUNTER]	obj_ary_shared_root_occupied  	            0
[RUBY_DEBUG_COUNTER]	obj_hash_empty                	            0
[RUBY_DEBUG_COUNTER]	obj_hash_1                    	            0
[RUBY_DEBUG_COUNTER]	obj_hash_2                    	            0
[RUBY_DEBUG_COUNTER]	obj_hash_3                    	            0
[RUBY_DEBUG_COUNTER]	obj_hash_4                    	            0
[RUBY_DEBUG_COUNTER]	obj_hash_5_8                  	            0
[RUBY_DEBUG_COUNTER]	obj_hash_g8                   	            0
[RUBY_DEBUG_COUNTER]	obj_hash_null                 	            0
[RUBY_DEBUG_COUNTER]	obj_hash_ar                   	            0
[RUBY_DEBUG_COUNTER]	obj_hash_st                   	            0
[RUBY_DEBUG_COUNTER]	obj_hash_transient            	            0
[RUBY_DEBUG_COUNTER]	obj_hash_force_convert        	            0
[RUBY_DEBUG_COUNTER]	obj_struct_embed              	            0
[RUBY_DEBUG_COUNTER]	obj_struct_transient          	            0
[RUBY_DEBUG_COUNTER]	obj_struct_ptr                	            0
[RUBY_DEBUG_COUNTER]	obj_data_empty                	            0
[RUBY_DEBUG_COUNTER]	obj_data_xfree                	            0
[RUBY_DEBUG_COUNTER]	obj_data_imm_free             	            0
[RUBY_DEBUG_COUNTER]	obj_data_zombie               	            0
[RUBY_DEBUG_COUNTER]	obj_match_under4              	            0
[RUBY_DEBUG_COUNTER]	obj_match_ge4                 	            0
[RUBY_DEBUG_COUNTER]	obj_match_ge8                 	            0
[RUBY_DEBUG_COUNTER]	obj_match_ptr                 	            0
[RUBY_DEBUG_COUNTER]	obj_iclass_ptr                	            0
[RUBY_DEBUG_COUNTER]	obj_class_ptr                 	            0
[RUBY_DEBUG_COUNTER]	obj_module_ptr                	            0
[RUBY_DEBUG_COUNTER]	obj_bignum_ptr                	            0
[RUBY_DEBUG_COUNTER]	obj_bignum_embed              	            0
[RUBY_DEBUG_COUNTER]	obj_float                     	            0
[RUBY_DEBUG_COUNTER]	obj_complex                   	            0
[RUBY_DEBUG_COUNTER]	obj_rational                  	            0
[RUBY_DEBUG_COUNTER]	obj_regexp_ptr                	            0
[RUBY_DEBUG_COUNTER]	obj_file_ptr                  	            0
[RUBY_DEBUG_COUNTER]	obj_symbol                    	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_ment                	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_iseq                	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_env                 	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_tmpbuf              	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_ast                 	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_cref                	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_svar                	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_throw_data          	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_ifunc               	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_memo                	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_parser_strterm      	            0
[RUBY_DEBUG_COUNTER]	artable_hint_hit              	       23,024
[RUBY_DEBUG_COUNTER]	artable_hint_miss             	          174
[RUBY_DEBUG_COUNTER]	artable_hint_notfound         	       27,875
[RUBY_DEBUG_COUNTER]	heap_xmalloc                  	        7,642
[RUBY_DEBUG_COUNTER]	heap_xrealloc                 	          153
[RUBY_DEBUG_COUNTER]	heap_xfree                    	          539
[RUBY_DEBUG_COUNTER]	theap_alloc                   	        9,295
[RUBY_DEBUG_COUNTER]	theap_alloc_fail              	            0
[RUBY_DEBUG_COUNTER]	theap_evacuate                	            0
[RUBY_DEBUG_COUNTER]	mjit_exec                     	            0
[RUBY_DEBUG_COUNTER]	mjit_exec_not_added           	            0
[RUBY_DEBUG_COUNTER]	mjit_exec_not_added_add_iseq  	            0
[RUBY_DEBUG_COUNTER]	mjit_exec_not_ready           	            0
[RUBY_DEBUG_COUNTER]	mjit_exec_not_compiled        	            0
[RUBY_DEBUG_COUNTER]	mjit_exec_call_func           	            0
[RUBY_DEBUG_COUNTER]	mjit_frame_VM2VM              	            0
[RUBY_DEBUG_COUNTER]	mjit_frame_VM2JT              	            0
[RUBY_DEBUG_COUNTER]	mjit_frame_JT2JT              	            0
[RUBY_DEBUG_COUNTER]	mjit_frame_JT2VM              	            0
[RUBY_DEBUG_COUNTER]	mjit_cancel                   	            0
[RUBY_DEBUG_COUNTER]	mjit_cancel_ivar_inline       	            0
[RUBY_DEBUG_COUNTER]	mjit_cancel_send_inline       	            0
[RUBY_DEBUG_COUNTER]	mjit_cancel_opt_insn          	            0
[RUBY_DEBUG_COUNTER]	mjit_cancel_invalidate_all    	            0
[RUBY_DEBUG_COUNTER]	mjit_length_unit_queue        	            0
[RUBY_DEBUG_COUNTER]	mjit_length_active_units      	            0
[RUBY_DEBUG_COUNTER]	mjit_length_compact_units     	            0
[RUBY_DEBUG_COUNTER]	mjit_length_stale_units       	            0
[RUBY_DEBUG_COUNTER]	mjit_compile_failures         	            0
```

Results for 3.0 are: 

```
[RUBY_DEBUG_COUNTER]	417140 show_debug_counters
[RUBY_DEBUG_COUNTER]	mc_inline_hit                 	      383,937
[RUBY_DEBUG_COUNTER]	mc_inline_miss_klass          	       37,470
[RUBY_DEBUG_COUNTER]	mc_inline_miss_invalidated    	            0
[RUBY_DEBUG_COUNTER]	mc_cme_complement             	          166
[RUBY_DEBUG_COUNTER]	mc_cme_complement_hit         	          166
[RUBY_DEBUG_COUNTER]	mc_search                     	        7,248
[RUBY_DEBUG_COUNTER]	mc_search_notfound            	        4,254
[RUBY_DEBUG_COUNTER]	mc_search_super               	      107,104
[RUBY_DEBUG_COUNTER]	obj_respond_to                	          613
[RUBY_DEBUG_COUNTER]	ci_packed                     	       13,043
[RUBY_DEBUG_COUNTER]	ci_kw                         	            0
[RUBY_DEBUG_COUNTER]	ci_nokw                       	            0
[RUBY_DEBUG_COUNTER]	ci_runtime                    	       13,043
[RUBY_DEBUG_COUNTER]	cc_new                        	          228
[RUBY_DEBUG_COUNTER]	cc_temp                       	            0
[RUBY_DEBUG_COUNTER]	cc_found_ccs                  	       36,718
[RUBY_DEBUG_COUNTER]	cc_ent_invalidate             	            0
[RUBY_DEBUG_COUNTER]	cc_cme_invalidate             	            0
[RUBY_DEBUG_COUNTER]	cc_invalidate_leaf            	            0
[RUBY_DEBUG_COUNTER]	cc_invalidate_leaf_ccs        	            0
[RUBY_DEBUG_COUNTER]	cc_invalidate_leaf_callable   	            0
[RUBY_DEBUG_COUNTER]	cc_invalidate_tree            	            0
[RUBY_DEBUG_COUNTER]	cc_invalidate_tree_cme        	            0
[RUBY_DEBUG_COUNTER]	cc_invalidate_tree_callable   	            0
[RUBY_DEBUG_COUNTER]	ccs_free                      	            0
[RUBY_DEBUG_COUNTER]	ccs_maxlen                    	            2
[RUBY_DEBUG_COUNTER]	ccs_found                     	       57,960
[RUBY_DEBUG_COUNTER]	iseq_num                      	            0
[RUBY_DEBUG_COUNTER]	iseq_cd_num                   	            0
[RUBY_DEBUG_COUNTER]	ccf_general                   	       11,291
[RUBY_DEBUG_COUNTER]	ccf_iseq_setup                	       36,053
[RUBY_DEBUG_COUNTER]	ccf_iseq_setup_0start         	        1,068
[RUBY_DEBUG_COUNTER]	ccf_iseq_setup_tailcall_0start	            0
[RUBY_DEBUG_COUNTER]	ccf_iseq_fix                  	      154,419
[RUBY_DEBUG_COUNTER]	ccf_iseq_opt                  	       16,076
[RUBY_DEBUG_COUNTER]	ccf_iseq_kw1                  	          124
[RUBY_DEBUG_COUNTER]	ccf_iseq_kw2                  	          231
[RUBY_DEBUG_COUNTER]	ccf_cfunc                     	        1,878
[RUBY_DEBUG_COUNTER]	ccf_cfunc_with_frame          	      123,495
[RUBY_DEBUG_COUNTER]	ccf_ivar                      	       51,189
[RUBY_DEBUG_COUNTER]	ccf_attrset                   	          698
[RUBY_DEBUG_COUNTER]	ccf_method_missing            	          524
[RUBY_DEBUG_COUNTER]	ccf_zsuper                    	            0
[RUBY_DEBUG_COUNTER]	ccf_bmethod                   	       18,238
[RUBY_DEBUG_COUNTER]	ccf_opt_send                  	        8,025
[RUBY_DEBUG_COUNTER]	ccf_opt_call                  	          857
[RUBY_DEBUG_COUNTER]	ccf_opt_block_call            	            0
[RUBY_DEBUG_COUNTER]	ccf_super_method              	           32
[RUBY_DEBUG_COUNTER]	frame_push                    	      390,819
[RUBY_DEBUG_COUNTER]	frame_push_method             	      207,971
[RUBY_DEBUG_COUNTER]	frame_push_block              	       35,437
[RUBY_DEBUG_COUNTER]	frame_push_class              	            0
[RUBY_DEBUG_COUNTER]	frame_push_top                	            0
[RUBY_DEBUG_COUNTER]	frame_push_cfunc              	      143,645
[RUBY_DEBUG_COUNTER]	frame_push_ifunc              	        3,764
[RUBY_DEBUG_COUNTER]	frame_push_eval               	            0
[RUBY_DEBUG_COUNTER]	frame_push_rescue             	            2
[RUBY_DEBUG_COUNTER]	frame_push_dummy              	            0
[RUBY_DEBUG_COUNTER]	frame_R2R                     	      219,554
[RUBY_DEBUG_COUNTER]	frame_R2C                     	      132,840
[RUBY_DEBUG_COUNTER]	frame_C2C                     	       14,569
[RUBY_DEBUG_COUNTER]	frame_C2R                     	       23,856
[RUBY_DEBUG_COUNTER]	ivar_get_ic_hit               	      106,326
[RUBY_DEBUG_COUNTER]	ivar_get_ic_miss              	       20,239
[RUBY_DEBUG_COUNTER]	ivar_get_ic_miss_serial       	       27,800
[RUBY_DEBUG_COUNTER]	ivar_get_ic_miss_unset        	       10,739
[RUBY_DEBUG_COUNTER]	ivar_get_ic_miss_noobject     	            0
[RUBY_DEBUG_COUNTER]	ivar_set_ic_hit               	       17,837
[RUBY_DEBUG_COUNTER]	ivar_set_ic_miss              	        1,283
[RUBY_DEBUG_COUNTER]	ivar_set_ic_miss_serial       	        5,148
[RUBY_DEBUG_COUNTER]	ivar_set_ic_miss_unset        	            7
[RUBY_DEBUG_COUNTER]	ivar_set_ic_miss_iv_hit       	        5,155
[RUBY_DEBUG_COUNTER]	ivar_set_ic_miss_noobject     	        1,283
[RUBY_DEBUG_COUNTER]	ivar_get_base                 	       21,570
[RUBY_DEBUG_COUNTER]	ivar_set_base                 	        1,304
[RUBY_DEBUG_COUNTER]	lvar_get                      	      354,236
[RUBY_DEBUG_COUNTER]	lvar_get_dynamic              	       40,161
[RUBY_DEBUG_COUNTER]	lvar_set                      	       78,173
[RUBY_DEBUG_COUNTER]	lvar_set_dynamic              	        1,252
[RUBY_DEBUG_COUNTER]	lvar_set_slowpath             	          101
[RUBY_DEBUG_COUNTER]	gc_count                      	            0
[RUBY_DEBUG_COUNTER]	gc_minor_newobj               	            0
[RUBY_DEBUG_COUNTER]	gc_minor_malloc               	            0
[RUBY_DEBUG_COUNTER]	gc_minor_method               	            0
[RUBY_DEBUG_COUNTER]	gc_minor_capi                 	            0
[RUBY_DEBUG_COUNTER]	gc_minor_stress               	            0
[RUBY_DEBUG_COUNTER]	gc_major_nofree               	            0
[RUBY_DEBUG_COUNTER]	gc_major_oldgen               	            0
[RUBY_DEBUG_COUNTER]	gc_major_shady                	            0
[RUBY_DEBUG_COUNTER]	gc_major_force                	            0
[RUBY_DEBUG_COUNTER]	gc_major_oldmalloc            	            0
[RUBY_DEBUG_COUNTER]	gc_isptr_trial                	            0
[RUBY_DEBUG_COUNTER]	gc_isptr_range                	            0
[RUBY_DEBUG_COUNTER]	gc_isptr_align                	            0
[RUBY_DEBUG_COUNTER]	gc_isptr_maybe                	            0
[RUBY_DEBUG_COUNTER]	obj_newobj                    	       57,746
[RUBY_DEBUG_COUNTER]	obj_newobj_slowpath           	          873
[RUBY_DEBUG_COUNTER]	obj_newobj_wb_unprotected     	          733
[RUBY_DEBUG_COUNTER]	obj_free                      	            0
[RUBY_DEBUG_COUNTER]	obj_promote                   	            0
[RUBY_DEBUG_COUNTER]	obj_wb_unprotect              	            0
[RUBY_DEBUG_COUNTER]	obj_obj_embed                 	            0
[RUBY_DEBUG_COUNTER]	obj_obj_transient             	            0
[RUBY_DEBUG_COUNTER]	obj_obj_ptr                   	            0
[RUBY_DEBUG_COUNTER]	obj_str_ptr                   	            0
[RUBY_DEBUG_COUNTER]	obj_str_embed                 	            0
[RUBY_DEBUG_COUNTER]	obj_str_shared                	            0
[RUBY_DEBUG_COUNTER]	obj_str_nofree                	            0
[RUBY_DEBUG_COUNTER]	obj_str_fstr                  	            0
[RUBY_DEBUG_COUNTER]	obj_ary_embed                 	            0
[RUBY_DEBUG_COUNTER]	obj_ary_transient             	            0
[RUBY_DEBUG_COUNTER]	obj_ary_ptr                   	            1
[RUBY_DEBUG_COUNTER]	obj_ary_extracapa             	            0
[RUBY_DEBUG_COUNTER]	obj_ary_shared_create         	           81
[RUBY_DEBUG_COUNTER]	obj_ary_shared                	            0
[RUBY_DEBUG_COUNTER]	obj_ary_shared_root_occupied  	            0
[RUBY_DEBUG_COUNTER]	obj_hash_empty                	            0
[RUBY_DEBUG_COUNTER]	obj_hash_1                    	            0
[RUBY_DEBUG_COUNTER]	obj_hash_2                    	            0
[RUBY_DEBUG_COUNTER]	obj_hash_3                    	            0
[RUBY_DEBUG_COUNTER]	obj_hash_4                    	            0
[RUBY_DEBUG_COUNTER]	obj_hash_5_8                  	            0
[RUBY_DEBUG_COUNTER]	obj_hash_g8                   	            0
[RUBY_DEBUG_COUNTER]	obj_hash_null                 	            0
[RUBY_DEBUG_COUNTER]	obj_hash_ar                   	            0
[RUBY_DEBUG_COUNTER]	obj_hash_st                   	            0
[RUBY_DEBUG_COUNTER]	obj_hash_transient            	            0
[RUBY_DEBUG_COUNTER]	obj_hash_force_convert        	            0
[RUBY_DEBUG_COUNTER]	obj_struct_embed              	            0
[RUBY_DEBUG_COUNTER]	obj_struct_transient          	            0
[RUBY_DEBUG_COUNTER]	obj_struct_ptr                	            0
[RUBY_DEBUG_COUNTER]	obj_data_empty                	            0
[RUBY_DEBUG_COUNTER]	obj_data_xfree                	            0
[RUBY_DEBUG_COUNTER]	obj_data_imm_free             	            0
[RUBY_DEBUG_COUNTER]	obj_data_zombie               	            0
[RUBY_DEBUG_COUNTER]	obj_match_under4              	            0
[RUBY_DEBUG_COUNTER]	obj_match_ge4                 	            0
[RUBY_DEBUG_COUNTER]	obj_match_ge8                 	            0
[RUBY_DEBUG_COUNTER]	obj_match_ptr                 	            0
[RUBY_DEBUG_COUNTER]	obj_iclass_ptr                	            0
[RUBY_DEBUG_COUNTER]	obj_class_ptr                 	            0
[RUBY_DEBUG_COUNTER]	obj_module_ptr                	            0
[RUBY_DEBUG_COUNTER]	obj_bignum_ptr                	            0
[RUBY_DEBUG_COUNTER]	obj_bignum_embed              	            0
[RUBY_DEBUG_COUNTER]	obj_float                     	            0
[RUBY_DEBUG_COUNTER]	obj_complex                   	            0
[RUBY_DEBUG_COUNTER]	obj_rational                  	            0
[RUBY_DEBUG_COUNTER]	obj_regexp_ptr                	            0
[RUBY_DEBUG_COUNTER]	obj_file_ptr                  	            0
[RUBY_DEBUG_COUNTER]	obj_symbol                    	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_ment                	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_iseq                	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_env                 	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_tmpbuf              	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_ast                 	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_cref                	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_svar                	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_throw_data          	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_ifunc               	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_memo                	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_parser_strterm      	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_callinfo            	            0
[RUBY_DEBUG_COUNTER]	obj_imemo_callcache           	            0
[RUBY_DEBUG_COUNTER]	artable_hint_hit              	       22,575
[RUBY_DEBUG_COUNTER]	artable_hint_miss             	           70
[RUBY_DEBUG_COUNTER]	artable_hint_notfound         	       27,631
[RUBY_DEBUG_COUNTER]	heap_xmalloc                  	        6,942
[RUBY_DEBUG_COUNTER]	heap_xrealloc                 	          987
[RUBY_DEBUG_COUNTER]	heap_xfree                    	          423
[RUBY_DEBUG_COUNTER]	theap_alloc                   	        7,715
[RUBY_DEBUG_COUNTER]	theap_alloc_fail              	            0
[RUBY_DEBUG_COUNTER]	theap_evacuate                	            0
[RUBY_DEBUG_COUNTER]	mjit_exec                     	            0
[RUBY_DEBUG_COUNTER]	mjit_exec_not_added           	            0
[RUBY_DEBUG_COUNTER]	mjit_exec_not_ready           	            0
[RUBY_DEBUG_COUNTER]	mjit_exec_not_compiled        	            0
[RUBY_DEBUG_COUNTER]	mjit_exec_call_func           	            0
[RUBY_DEBUG_COUNTER]	mjit_add_iseq_to_process      	            0
[RUBY_DEBUG_COUNTER]	mjit_unload_units             	            0
[RUBY_DEBUG_COUNTER]	mjit_frame_VM2VM              	            0
[RUBY_DEBUG_COUNTER]	mjit_frame_VM2JT              	            0
[RUBY_DEBUG_COUNTER]	mjit_frame_JT2JT              	            0
[RUBY_DEBUG_COUNTER]	mjit_frame_JT2VM              	            0
[RUBY_DEBUG_COUNTER]	mjit_cancel                   	            0
[RUBY_DEBUG_COUNTER]	mjit_cancel_ivar_inline       	            0
[RUBY_DEBUG_COUNTER]	mjit_cancel_exivar_inline     	            0
[RUBY_DEBUG_COUNTER]	mjit_cancel_send_inline       	            0
[RUBY_DEBUG_COUNTER]	mjit_cancel_opt_insn          	            0
[RUBY_DEBUG_COUNTER]	mjit_cancel_invalidate_all    	            0
[RUBY_DEBUG_COUNTER]	mjit_cancel_leave             	            0
[RUBY_DEBUG_COUNTER]	mjit_length_unit_queue        	            0
[RUBY_DEBUG_COUNTER]	mjit_length_active_units      	            0
[RUBY_DEBUG_COUNTER]	mjit_length_compact_units     	            0
[RUBY_DEBUG_COUNTER]	mjit_length_stale_units       	            0
[RUBY_DEBUG_COUNTER]	mjit_compile_failures         	            0
```

I patched Ruby to also count obj_respond_to calls. 

This is our "profile mode" home page, it takes about 40ms or so and is very typical of Rails performance.

A single page will issue 613 obj_respond_to calls, I guess this is not properly cached. 



You can run it by running Discourse bench on 2.7 (which will prep the DB) then execute the script. 



----------------------------------------
Bug #17373: Ruby 3.0 is slower at Discourse bench than Ruby 2.7
https://bugs.ruby-lang.org/issues/17373#change-89027

* Author: sam.saffron (Sam Saffron)
* Status: Open
* Priority: Normal
* ruby -v: 3.0
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
We have a continuous effort to keep https://rubybench.org/ up to date. Unfortunately we have lapsed a bit on updates so I decided to run Discourse bench by hand.

On my local system I am noticing the timing are much slower on Discourse bench than they were on Ruby 2.7: 

```
98c9120cc00ba691b4abcc13a49a30fa54638535

---
categories:
  50: 34
  75: 35
  90: 36
  99: 40
home:
  50: 47
  75: 50
  90: 56
  99: 92
topic:
  50: 53
  75: 55
  90: 58
  99: 92
categories_admin:
  50: 33
  75: 34
  90: 38
  99: 68
home_admin:
  50: 45
  75: 47
  90: 51
  99: 95
topic_admin:
  50: 51
  75: 52
  90: 54
  99: 59
timings:
  load_rails: 1449
ruby-version: 3.0.0-p-1
rss_kb: 293808
pss_kb: 284244

2.7.2


---
categories:
  50: 29
  75: 30
  90: 33
  99: 43
home:
  50: 42
  75: 43
  90: 47
  99: 73
topic:
  50: 47
  75: 47
  90: 52
  99: 54
categories_admin:
  50: 30
  75: 31
  90: 36
  99: 56
home_admin:
  50: 41
  75: 43
  90: 48
  99: 71
topic_admin:
  50: 47
  75: 48
  90: 52
  99: 55
timings:
  load_rails: 1339
ruby-version: 2.7.2-p137
rss_kb: 296836
pss_kb: 287310


2.6.6


---
categories:
  50: 30
  75: 30
  90: 31
  99: 51
home:
  50: 40
  75: 42
  90: 60
  99: 79
topic:
  50: 47
  75: 48
  90: 53
  99: 71
categories_admin:
  50: 30
  75: 31
  90: 35
  99: 50
home_admin:
  50: 41
  75: 43
  90: 62
  99: 100
topic_admin:
  50: 48
  75: 49
  90: 65
  99: 93
timings:
  load_rails: 1464
ruby-version: 2.6.6-p146
rss_kb: 332268
pss_kb: 322865
```

Concretely this means a typical "homepage" view is taking 47 milliseconds now, when in the past it was taking 42 or even 40 ms.

There may be some issues with the bench, you can see it here: 

https://github.com/discourse/discourse/tree/ruby-3

The script to run the bench is `ruby script/bench.rb`

I re-tested against a cleanly built Ruby 2.7 direct from the Git branch to ensure compilation was not at fault.


This is pretty concerning, Discourse bench usually tracks Rails performance pretty accurately. 

---Files--------------------------------
aaron — perf _home_aaron_git_railsbench — ssh whiteclaw.local — 175×54 2020-12-07 12-41-12.png (842 KB)
aaron — perf _home_aaron_git_railsbench — ssh whiteclaw.local — 175×54 2020-12-07 12-41-58.png (874 KB)
aaron — perf _home_aaron_git_railsbench — ssh whiteclaw.local — 299×65 2020-12-07 13-19-20.png (142 KB)


-- 
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>

In This Thread