Skip to content

Mark mp_binary_op() unroll_safe.#10

Merged
ltratt merged 1 commit intoykjit:masterfrom
vext01:unroll
Mar 17, 2026
Merged

Mark mp_binary_op() unroll_safe.#10
ltratt merged 1 commit intoykjit:masterfrom
vext01:unroll

Conversation

@vext01
Copy link

@vext01 vext01 commented Mar 17, 2026

This slows down mandelbrot, but speeds up "bigloop"-like benchmarks and CLBG fannkuch Python3 #8.

fannkuch Python3 #8 speeds up by about 40%.

This makes us about over 2x upstream micropython on that benchmark.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/fannkuchredux-python3-8.html

py/runtime.c Outdated

mp_obj_t MICROPY_WRAP_MP_BINARY_OP(mp_binary_op)(mp_binary_op_t op, mp_obj_t lhs, mp_obj_t rhs) {
// NOTE: this annotation makes bigloop and CLBG fannkuch Python3 #8 faster, but
// makes Laurie's mandelbrot (XXX where did he get it?) slower.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ltratt where did you get your mandelbrot benchmark from?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An LLM!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing!

@ltratt ltratt marked this pull request as ready for review March 17, 2026 17:20
@ltratt
Copy link

ltratt commented Mar 17, 2026

@ebarrett Do you want to update the comment in this PR?

@vext01
Copy link
Author

vext01 commented Mar 17, 2026

I'll do it quickly now

@vext01
Copy link
Author

vext01 commented Mar 17, 2026

Updated.

@ltratt ltratt added this pull request to the merge queue Mar 17, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 17, 2026
This slows down mandelbrot, but speeds up "bigloop"-like benchmarks and
CLBG fannkuch Python3 ykjit#8.

fannkuch Python3 ykjit#8 speeds up by about 40%.

This makes us about over 2x upstream micropython on that benchmark.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/fannkuchredux-python3-8.html
@vext01
Copy link
Author

vext01 commented Mar 17, 2026

Fixed CI failure.

@ltratt ltratt added this pull request to the merge queue Mar 17, 2026
Merged via the queue into ykjit:master with commit ae52b3b Mar 17, 2026
2 checks passed
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