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

perf gap with flexpolyline #35

Closed
urschrei opened this issue Mar 17, 2024 · 2 comments · Fixed by #46
Closed

perf gap with flexpolyline #35

urschrei opened this issue Mar 17, 2024 · 2 comments · Fixed by #46

Comments

@urschrei
Copy link
Member

urschrei commented Mar 17, 2024

The https://docs.rs/flexpolyline/0.1.0/flexpolyline/ crate runs the bench_encode benchmark in around 19 µs 330 ns on my machine, vs 77 µs for our decode function. That's in the 3x ballpark. They seem to use a lot of lookups, which I imagine accounts for the difference, but it would be good to investigate.

@mattiZed
Copy link
Contributor

I have looked into their code, I assume you're right, the speed up comes from the explicit conversions via LUTs. In their algorithm they also need it because of the more complex char-map which is not just monotonically increasing from ASCII 63 as in GPolyline. I will try the approach while fixing #39.

@urschrei
Copy link
Member Author

Addressed by #42, #43, #48, #49.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants