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

remove cloning from geo iterators in trait #278

Merged
merged 5 commits into from
Nov 28, 2023

Conversation

kylebarron
Copy link
Member

@kylebarron kylebarron commented Nov 27, 2023

  • this should be copied into geo as well
  • I wonder if there's a perf improvement from the removed cloning
  • It would be nice to make a quick bench before merging

@kylebarron
Copy link
Member Author

Turned out this was super simple to implement, I just had to remove Iter's dependency on Self::ItemType. cc @JosiahParry since this can simplify your code here https://github.com/JosiahParry/serde_esri/blob/1f7f70e086463079bc2d99b925580e052b7382be/src/geoarrow_compat.rs#L56. I don't think you need a separate iterator struct unless you want to

@kylebarron kylebarron changed the title wip: remove cloning from geo iterators in trait remove cloning from geo iterators in trait Nov 27, 2023
@kylebarron
Copy link
Member Author

omg yessssssss. This branch compared to main 🚀 cc @JosiahParry

convert Vec<geo::Polygon> to PolygonArray
                        time:   [31.564 µs 31.608 µs 31.661 µs]
                        change: [-52.414% -52.271% -52.131%] (p = 0.00 < 0.05)
                        Performance has improved.

@kylebarron kylebarron merged commit 9a0df7f into main Nov 28, 2023
6 checks passed
@kylebarron kylebarron deleted the kyle/remove-clone-geo-iterator branch November 28, 2023 03:53
@JosiahParry
Copy link
Contributor

SHEEEEEESSH!

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