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

Inline coordinate casting #104

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Inline coordinate casting #104

wants to merge 2 commits into from

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.

src/process.rs Outdated Show resolved Hide resolved
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.

None yet

2 participants