this post was submitted on 25 Jun 2023
3 points (80.0% liked)

Rust

6005 readers
6 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] Droggl@lemmy.sdf.org 0 points 1 year ago (1 children)

Nice walkthrough of how to extend your python with rust and what to watch out for to actually speed things up, thanks!

Not sure whether this is just a property of your toy example (and not the original code), but it may be worth pointing out to future readers that the "finding close polygons" part can in practice likely be sped up drastically with some spatial data structure (eg spatial hashing or a k-d-tree).

[โ€“] snaggen@programming.dev 0 points 1 year ago

Just to be clear, I'm not the author of the article. I just found it on the Internet and found it interesting.