...
This script generates permutations and checks each one. With 12 words, there are indeed 479,001,600 possible permutations, so this method could be time-consuming.
The BIP39 checksum is used to detect errors in the mnemonic phrase, but it won't help you recover the correct word order.
...
The checksum might help as an optimization. I think it is faster to check that the checksum is correct than it is to check if the phrase generates a known address.
So, for each permutation, first checking the checksum would eliminate 93.75% of them. For the remaining 6.25% you would still have to check against the known addresses.