Skip to content

Conversation

@ysndr
Copy link
Member

@ysndr ysndr commented Nov 10, 2022

So we only iterate once...
Sorry, got in my head ^^

@ysndr ysndr requested a review from Radvendii November 10, 2022 19:45
Copy link
Collaborator

@Radvendii Radvendii left a comment

Choose a reason for hiding this comment

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

My instinct changing this to a fold makes things slightly less readable, but I think that might just be because I'm used to the other version. A fold might actually make more sense here. What do you think? Obviously it's more efficient, but is it as readable? I've stared at the code for too long to be able to tell.

Co-authored-by: Taeer Bar-Yam <[email protected]>
@ysndr
Copy link
Member Author

ysndr commented Nov 15, 2022

yes, I guess the x y xs ys and additional parenthesis didn't help with readability.
It should be faster though.
It doesn't scream at you that it's doing an unzip so thats an additional comment somewhere.
If its not requiring to be the most performant thing i suggest we can keep this as an academic exercise and leave it as it is.

Like, i don't know how big the metric data would be and if iterating it twice would be noticeable.

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