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

Optimize point clouds #4932

Merged
merged 5 commits into from Jan 29, 2024
Merged

Optimize point clouds #4932

merged 5 commits into from Jan 29, 2024

Conversation

emilk
Copy link
Member

@emilk emilk commented Jan 29, 2024

What

Some optimizations I found while playing around with large point clouds.

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@emilk emilk added 📉 performance Optimization, memory use, etc include in changelog labels Jan 29, 2024
@Wumpf Wumpf self-requested a review January 29, 2024 10:33
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

neat, but how much faster did it get for you?

Comment on lines +123 to +124
// TODO(emilk): optimize the extend function.
// Right now it is 3-4x faster to collect to a vec first, which is crazy.
Copy link
Member

Choose a reason for hiding this comment

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

oh wow, that's so sad. I wonder what aspect of this method is this and if that's true with all iterators or only some.

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'm guessing all the added bounds check

@emilk
Copy link
Member Author

emilk commented Jan 29, 2024

Well, I have 16 cores, so color loading got around 16x faster :)

@emilk emilk merged commit d017565 into main Jan 29, 2024
42 checks passed
@emilk emilk deleted the emilk/optimize-point-clouds branch January 29, 2024 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog 📉 performance Optimization, memory use, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants