While the AI and speed improvements overall do sound good and I do like the overall openness, I'm
pretty alarmed to hear that you're revamping the jobs assignment logic without mention of the highly suboptimal assignments that often happen!
It's very easy to run into slaves or drone pops that are working the wrong job, and where a simple swapping of two pops' job would result in a +15% output increase.
It seems to that whatever arbitrary weight is assigned when a pop "desires" a job, especially if custom scripts are involved, shouldn't occult the actual output that will result. If worst comes to worst you could introduce a last pass after the selection of which pops will work to ensure they are placed in the slot that generates the most output: this pass
would only allow swaps so wouldn't interfere with the prioritization of amenities or other needed resource. This would at least fix the scenario where pop A and B are both working jobs for which they're not particularly suited, and swapping them would at least cause one of them to benefit from some sort of bonus (+15% energy output for instance, like in the example in the thread linked above).
--
Side-note: as mentioned elsewhere I wonder if you've considered trading some extra memory for performance and pre-computing some values permanently for all existing race-job combinations. After all, once a race or job enters the game it never leaves, so the combinations created and associated values are good for the rest of the game. No point in computing them again every month. This lets you reuse the computation related to some never-changing facts (Robot race X has 15% energy production bonus) when computing values related to more dynamic elements (we're currently suffering a shortage of consumer goods).