Skip to content

Conversation

HerrCai0907
Copy link
Member

In the implementation of __visit, we will do non-zero check, so in visitMemberOf, we don't need to emit non-zero check.
Emit them both maybe have some performance benefit (I don't do bench for it), but at least for -Oz target, we should remove it.

export function __visit(ptr: usize, cookie: i32): void { if (!ptr) return; ...
@HerrCai0907 HerrCai0907 force-pushed the avoid-meaningless-check-before-visit branch from 51537b4 to 0adf149 Compare July 10, 2025 10:43
Copy link
Member

@CountBleck CountBleck left a comment

Choose a reason for hiding this comment

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

Looks great! How'd you notice this?

@HerrCai0907
Copy link
Member Author

HerrCai0907 commented Jul 11, 2025

I am improving the runtime performance and reviewing generated code line by line. 😅

@HerrCai0907 HerrCai0907 merged commit ef01f2b into AssemblyScript:main Jul 11, 2025
14 checks passed
@HerrCai0907 HerrCai0907 deleted the avoid-meaningless-check-before-visit branch July 11, 2025 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants