| ▲ | Eridrus 2 hours ago | ||||||||||||||||
I'm pretty sure nobody is going to be upset about randomized algorithms in compilers. Postgres uses genetic algos for join order optimization at a certain scale and nobody is upset by that. | |||||||||||||||||
| ▲ | dijit 2 hours ago | parent [-] | ||||||||||||||||
Thankfully postgres is something I know a lot about, so I can speak with some competence. Genettic algorithms do rely on randomness, but it's pseudorandom, and Postgres seeds GEQO from `geqo_seed` (which defaults to 0). So the same query, with the same stats, same settings: becomes the same plan. “Randomised”, yeah, but totally reproducible. That's the property people actually care about in compilers too btw. | |||||||||||||||||
| |||||||||||||||||