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

Use receive and let-optionals* from (chicken base) #1

Merged
merged 1 commit into from
Aug 28, 2021
Merged

Use receive and let-optionals* from (chicken base) #1

merged 1 commit into from
Aug 28, 2021

Conversation

wasamasa
Copy link

This avoids a minor speed penalty.

@ThatGeoGuy
Copy link
Owner

ThatGeoGuy commented Aug 27, 2021

Tests pass locally, this looks good! Thanks for submitting this, do you have any actual data on the speed increase?

I'd like to bump version and add some notes to the wiki.

@wasamasa
Copy link
Author

chicken-install srfi-133 -test  0.19s user 0.03s system 64% cpu 0.341 total
chicken-install -test  0.17s user 0.02s system 95% cpu 0.203 total

Similar figures of 5-10% performance increases were found for the other two eggs redefining receive and let-optionals*, srfi-130 and srfi-152:

chicken-install srfi-130 -test  0.77s user 0.02s system 99% cpu 0.789 total
chicken-install -test  0.70s user 0.03s system 98% cpu 0.741 total
chicken-install srfi-152 -test  0.71s user 0.04s system 85% cpu 0.874 total
chicken-install -test  0.71s user 0.01s system 99% cpu 0.729 total

When I specifically tried to benchmark something like srfi-130's string-unfold by running four different invocations for 100k times, there's a difference of 50-100ms.

@ThatGeoGuy ThatGeoGuy merged commit 80594bb into ThatGeoGuy:master Aug 28, 2021
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