Skip to content

Arc & circle generation that does not calculate sin & cos for every vertex#66

Open
ftvkyo wants to merge 2 commits intolelongg:masterfrom
ftvkyo:arc-generation
Open

Arc & circle generation that does not calculate sin & cos for every vertex#66
ftvkyo wants to merge 2 commits intolelongg:masterfrom
ftvkyo:arc-generation

Conversation

@ftvkyo
Copy link
Contributor

@ftvkyo ftvkyo commented May 14, 2025

  • When offsetting a point, the performance improvement seems to be ~45%
  • When offsetting line strings and polygons, the performance seems to be similar (current implementation shows an improvement of ~5%, but minor changes easily make performance worse by ~2% instead), so it's probably other factors that affect it the most
  • This may help address this issue: Strange dilating behaviour  #27
  • Draft PR for now because I need to review & likely update the tests

Open to feedback :)

  • Review & update the tests
  • Add a benchmark that checks fn create_arc in (almost?) isolation

ftvkyo added 2 commits May 14, 2025 12:51
Don't calculate sin & cos for every vertex and instead rotate a vector
@ftvkyo
Copy link
Contributor Author

ftvkyo commented Jun 23, 2025

Output of the updated test_point_offset:

test_point_offset

@ftvkyo ftvkyo marked this pull request as ready for review June 23, 2025 09:33
@lelongg
Copy link
Owner

lelongg commented Jun 23, 2025

I'm open to merge once you are ready

@ftvkyo
Copy link
Contributor Author

ftvkyo commented Jun 23, 2025

I don't think I'd manage to get around to that create_arc benchmark I mentioned anytime soon, so if you are happy with it, please do merge, thank you!

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