Skip to content

Conversation

@hhugo
Copy link
Member

@hhugo hhugo commented Aug 7, 2023

initially based on #1333 and #1334, then rebased on #1496.

The current implementation exits a loop as soon as possible. The generated code would be better if we allowed part of the continuations to remains inside the for-loop.

@hhugo hhugo marked this pull request as draft September 28, 2023 13:15
@hhugo
Copy link
Member Author

hhugo commented Nov 23, 2023

Check ocaml-wasm/wasm_of_ocaml@f517bbc

@hhugo hhugo marked this pull request as ready for review November 24, 2023 09:48
@hhugo
Copy link
Member Author

hhugo commented Nov 24, 2023

@vouillon, I've cherry-picked your implementation from wasm_of_ocaml. Do you think the same heuristic is appropriate for jsoo ? In particular, the is_small part ?

@hhugo
Copy link
Member Author

hhugo commented Nov 28, 2023

We should probably try to not nest loop if unnecessary.

@hhugo hhugo force-pushed the exit-loop-early branch 4 times, most recently from 52936d8 to d502e2e Compare November 28, 2023 16:54
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