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

Adds a slightly nicer setup for benchmarking #13

Merged
merged 3 commits into from
Sep 6, 2023
Merged

Conversation

gampleman
Copy link
Collaborator

I started looking into making some of the List.Extra functions tail recursive. I wanted to see what impact it has on performance:

Benchmark results showing tail recursive functions being about 15% slower for unfolds and uniquePairs

In order to do this, I jazzed up the package.json scripts so that you can run npm run start:bench and you should get the benchmarks to appear on your screen running. A fun project would be to make an actual CLI runner, but one step at a time 🤷.

If you have time, I'd appreciate some code review (cc @miniBill and @ahankinson).

@ahankinson
Copy link
Contributor

Am I right in thinking that this structure will only be temporary? That eventually one or the other version will be chosen and implemented? If so, I would not actually commit the changes to the List/Extra module versions in the module itself until one is chosen.

Perhaps a benchmarks/src/List/Extra/*.elm structure would be useful to capture the testing phases? I see there's already a similar structure for Array.Extra

@gampleman
Copy link
Collaborator Author

@ahankinson I'm slightly confused. Isn't that what's in this PR? All of the implementations being evaluated are in benchmarks/src/List/Extra/* (even though at the moment some of them are duplicates of what's in List.Extra.

@ahankinson
Copy link
Contributor

You are right, my mistake! I didn't see that the folder was indented on the left. I'm sorry.

package.json Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@gampleman gampleman merged commit 8c36f70 into master Sep 6, 2023
4 checks passed
@gampleman gampleman deleted the benchmarking-setup branch September 6, 2023 10:59
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.

3 participants