Get the latest tech news
Using Rust to corrode insane Python run-times
There are times when adopting a standard approach just isn't good enough. This post is about making minimal changes for maximum effect where it matters.
Try breaking the data into chunks, and then using multi-processing (ugly in Python) to leverage a more powerful cloud virtual machine, sticking with matplotlib Avoid calling the library for every polygon, make one call per dataframe to reduce the library-call overhead massively Avoid heavyweight geometry libraries when the actual problem is very simple, the overhead hurts performance significantly Do bounding-box tests on every polygon Use integer-based math (faster than floating point), 32-bits where possible Use threads Upping the core count to 4 with code which is ultimately running in a Kubernetes cluster within AWS is perfectly reasonable when the goal here is a faster QA cycle.
Or read this on Hacker News