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 with builder pattern #3

Closed
wants to merge 3 commits into from
Closed

Conversation

maxbachmann
Copy link
Member

This is a quick experiment how the builder pattern for the API would look and how much effort it would be. At least the tags for type and score cutoff could be shared between implementations. Not really sure whether we can reduce duplication further, since these public functions should probably have documentation, which might differ between metrics. In theory I could generate a lot of this using macros, but that's not necessarily an improvement 😅

Comment on lines +546 to +547
// todo this calls s1.count internally is this optimizes in the same way it
// would if we pass in self.cache.s1.len()
Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't compare the assembler, but performance wise it doesn't make any noticeable difference. Would have been surprising too, since this iterator should know it's size.

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.

None yet

1 participant