Hi Sam,
In principle, loop unrolling should already reduce the number of stack
checks, but it could be that it's insufficient or that for whatever reason
this optimization does not get applied here. Did you take a look at the
generated code?
Cheers,
Emanuel
On Thu, Jun 12, 2025 at 4:44 PM Sam Parker-Haynes <[email protected]>
wrote:
> Hi!
>
> While running some AI code, the loop header WasmStackCheck was appearing
> quite heavily in the profile. Disabling the checks results in ~1.5%
> speedup. So, is it necessary to execute these for every iteration? Or could
> we wrap inner loops, devoid of a stack check, in a new loop with one so
> that these checks are executed for a fraction of what they are now?
>
> Cheers,
> Sam
>
>
>
> --
> --
> v8-dev mailing list
> [email protected]
> http://groups.google.com/group/v8-dev
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion visit
> https://groups.google.com/d/msgid/v8-dev/b4a77d25-21f9-4a0d-a467-8cbe48275bfbn%40googlegroups.com
> <https://groups.google.com/d/msgid/v8-dev/b4a77d25-21f9-4a0d-a467-8cbe48275bfbn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/v8-dev/CAPAU7RyGTVCKFUgJoTiDH546up4d8qJ4fQCr8aTKFBVtxUt%2BoQ%40mail.gmail.com.