Skip to content

Remove yk_promote from MP_BC_LOAD_CONST_OBJ.#17

Closed
Pavel-Durov wants to merge 1 commit into
ykjit:masterfrom
Pavel-Durov:remove-yk-promote-from-load-const
Closed

Remove yk_promote from MP_BC_LOAD_CONST_OBJ.#17
Pavel-Durov wants to merge 1 commit into
ykjit:masterfrom
Pavel-Durov:remove-yk-promote-from-load-const

Conversation

@Pavel-Durov
Copy link
Copy Markdown

@Pavel-Durov Pavel-Durov commented May 1, 2026

Remove yk_promote from MP_BC_LOAD_CONST_OBJ

Calling yk_promote at MP_BC_LOAD_CONST_OBJ adds overhead on every bytecode constant load. This PR removes it.

perf diff

Symbol Baseline (with yk_promote) Delta (without yk_promote)
__yk_opt_gc_alloc 85.76% -5.05%
mp_execute_bytecode 6.98% +2.65%

Runtime accounting

  with-promote:    29.655s
  without-promote: 22.227s
  extra:            7.428s
  diff: 29.655 / 22.227 = 33% (with-promote is 33% slower)

Time in __yk_opt_gc_alloc

  with-promote:    29.655s * 86% = 25.5s
  without-promote: 22.227s * 81% = 18.0s
  extra:                           +7.5s

Time in mp_execute_bytecode

  with-promote:    29.655s * 6.8%  = 2s
  without-promote: 22.227s * 9.75% = 2s
  diff: 0

Conclusion:
__yk_opt_gc_alloc accounts for almost 100% of the runtime regression
mp_execute_bytecode shows a diff in perf (6.8% vs 9.75%) but the
absolute time is the same (~2s each)

Calling yk_promote() in MP_BC_LOAD_CONST_OBJ adds runtime overhead of
~30% on AWFY List benchmark.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants