Population centers – where to put theme parks in the US so people are as close as possible

Check it out!

Honestly, the results of this didn’t end up being too interesting, partially because I only managed to get results for up to 3 theme parks. Originally I was hoping to go up to 5, but it seems like it would take a prohibitive amount of time…trying every combination of 5 counties from choosing 3100 is around 2.3 quadrillion!

The more interesting part was optimizing the script – see the GitHub project for a discussion of the steps I went through. It was very satisfying to write a slow but correct version and end up with a 40x speedup!

Writing the script in Rust was fun (see my earlier explorations with Rust) although unsurprisingly I still don’t think very idiomatically. There are definitely still some ugly parts in the script, maybe I’ll go back and clean those up at some point. It did seem to fit the task well, though; this is definitely a project where extra copies can make a big difference.

Now that we’ve been sheltering in place for a while it was very weird even contemplating the idea of going to a theme park!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s