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

Add Libseff Benchmarks #58

Merged
merged 31 commits into from
Jul 24, 2024

Conversation

codrutiftode
Copy link
Collaborator

I have implemented the following benchmarks in libseff:

  • countdown
  • fibonacci recursive
  • product early
  • iterator
  • generator
  • parsing dollars
  • resume nontail
  • handler sieve

I have also added a Dockerfile and updated the root level Makefile as to allow for building and running a libseff container. Have a look and let me know what you think! I tried to maintain a balance between staying close to the other implementations and making use of idiomatic C structures where possible (loops instead of recursion where the required concept was just a simple loop).

Finally, I updated the README as required. I placed a minus sign for nqueens, tree explore and triples, because they require multi-shot continuations which libseff does not support as far as I know.

Note: the libseff repo (https://github.com/effect-handlers/libseff.git) makes use of clang-10, so I have mirrored this in the Dockerfile / Makefiles, although the associated paper references clang-12. This required using Ubuntu 18.04 instead of ubuntu-latest as the base Docker image.

@jasigal jasigal requested review from phischu and dhil May 30, 2024 16:57
@jasigal jasigal self-assigned this May 30, 2024
@jasigal jasigal self-requested a review May 30, 2024 16:57
Copy link
Contributor

@dhil dhil left a comment

Choose a reason for hiding this comment

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

Looks good. I haven't studied it in great detail yet. A few things stand out:

  • You seem to always count backwards in loops, e.g. i = N; i > 0; i--. I suggest counting forward instead, it matters for performance when you use the iterator variable i to index into an array.
  • Mark non-public functions with static, i.e. every function except for main, I think.

benchmarks/libseff/product_early/main.c Outdated Show resolved Hide resolved
benchmarks/libseff/product_early/main.c Outdated Show resolved Hide resolved
benchmarks/libseff/product_early/main.c Outdated Show resolved Hide resolved
systems/libseff/Dockerfile Outdated Show resolved Hide resolved
benchmarks/libseff/parsing_dollars/main.c Outdated Show resolved Hide resolved
benchmarks/libseff/Makefile Outdated Show resolved Hide resolved
systems/libseff/Dockerfile Outdated Show resolved Hide resolved
systems/libseff/Dockerfile Outdated Show resolved Hide resolved
systems/libseff/Dockerfile Outdated Show resolved Hide resolved
benchmarks/libseff/parsing_dollars/main.c Show resolved Hide resolved
Copy link
Collaborator

@jasigal jasigal left a comment

Choose a reason for hiding this comment

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

Thanks everyone for your input, I've looked everything over one last time and it LGTM :)

@jasigal jasigal merged commit b6a0583 into effect-handlers:main Jul 24, 2024
9 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.

5 participants