Skip to content

Perf: lazy native-long / hot path (no value-box) (#36386) - #37054

Merged
PurHur merged 2 commits into
masterfrom
agent/issue-36386-native-long-div-lazy
Sep 6, 2026
Merged

Perf: lazy native-long / hot path (no value-box) (#36386)#37054
PurHur merged 2 commits into
masterfrom
agent/issue-36386-native-long-div-lazy

Conversation

@PurHur

@PurHur PurHur commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

php-src: Zend/zend_operators.c div_function.

Part of #36386.

Test plan

  • ./script/phpunit.sh --filter 'NativeLongDivHeapLazyAotTest|NativeLongOverflowHeapLazyAotTest|IntArithOverflowPromote31964AotTest'6/6
  • ./script/aot-smoke.sh9/9 + size gate OK
  • make north-star5-verify-fast → OK (spine 8343/8343)
  • Manual Zend match: show_div(10,2|7,2) + show_ov(PHP_INT_MAX) identical AOT/Zend
  • script/differential-sweep.sh --aot --repeat 3 — arith/c*/e*/g*/i36386* paths green; i36386_nothrow_strlen_literal DIFF (300 vs 201) reproduces on master (not this PR); intermittent core dumps under dual-run load not attributed to this slice

PurHur and others added 2 commits September 6, 2026 19:29
Exact int/int division stays TYPE_NATIVE_LONG with a cold f64 slot — peer of
±/× overflow lazy materialize. Also box on named assign / return coerce so
`$x = PHP_INT_MAX + 1` matches Zend (leftover of #37051).

php-src: Zend/zend_operators.c div_function.
Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant