Following up on this post, I'd like to point out that my previous assumption that, that specific piece of code was spiking my CPU usage was gravely wrong. It turns out that the problem is in my city Planning Function (which regulates site construction and resource gathering co-ordination). Rats.
The city planning function is only called once every 10 ticks. Initially this was ok because I would save up CPU points in my bucket, but my recent changes aren't scaling so well because the bucket seems to have a size limit larger than what I need to run my city planning.
My solution will be to stagger the planning process over multiple ticks. It's going to be a tricky task but I'll do it tomorrow when my owner is at work.
To glory (and to tiny robots who don't bottleneck my code)!
Your friend.
Bacon.