Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiment to use shallow effects in picos_mux.fifo #208

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

polytypic
Copy link
Collaborator

@polytypic polytypic commented Aug 8, 2024

It seems that using shallow effect handlers makes things slower, as shown by the "Picos Current" benchmark, which currently uses an effect, without reducing memory usage, as shown by the "Memory usage" benchmark.

The extra costs might be due to redoing the effc wrapping and updating the handler (i.e. the call update_handler) for every *continue* by continue_gen in the Stdlib:

  let continue_gen k resume_fun v handler =
    let effc eff k last_fiber =
      match handler.effc eff with
      | Some f -> f k
      | None -> reperform eff k last_fiber
    in
    let last_fiber = cont_last_fiber k in
    let stack = update_handler k handler.retc handler.exnc effc in
    resume stack resume_fun v last_fiber

@polytypic polytypic force-pushed the experiment-using-shallow-effects branch 11 times, most recently from 846a098 to 108fb76 Compare August 15, 2024 07:44
@polytypic polytypic force-pushed the experiment-using-shallow-effects branch 19 times, most recently from fe9a4c3 to 0ce6b28 Compare August 19, 2024 15:20
@polytypic polytypic force-pushed the experiment-using-shallow-effects branch 4 times, most recently from 650acfc to 53853e8 Compare September 28, 2024 18:54
@polytypic polytypic force-pushed the experiment-using-shallow-effects branch 8 times, most recently from 32288da to 06e98e6 Compare October 2, 2024 09:17
@polytypic polytypic force-pushed the experiment-using-shallow-effects branch 10 times, most recently from aac5304 to 0877a20 Compare October 16, 2024 11:12
@polytypic polytypic changed the title Experiment to use shallow effects in picos.fifos Experiment to use shallow effects in picos_mux.fifo Oct 16, 2024
@polytypic polytypic force-pushed the experiment-using-shallow-effects branch 5 times, most recently from a7ac9ce to e904d97 Compare October 22, 2024 00:35
@polytypic polytypic force-pushed the experiment-using-shallow-effects branch from e904d97 to ff7de85 Compare October 24, 2024 21:27
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