Does it skip non-valid checksum mnemonics?
Of course it does.
Example for 24 wordsOn electrum it takes much less time than on BIP39. Why does that happen?
It is because the slowest part of the code is
SetBip32(...) method and it is only called when the checksum of the created mnemonic is valid. When we call it less times, the speed is going to be a lot higher.
The number of times checksum is valid depends on the size of the checksum, the bigger it is the less collision occurs and SetBip32() is called less times.
A 12-words BIP39 mnemonic only has a 4-bit checksum while a 12-word Electrum mnemonic has at least 8 bits of checksum (8 bits for standard type, 12 bits for other types).
Back to our 5
th example
duck firm october practice soccer * result regret unveil * uncle ginger
child private key: L5fdNeFhX5Kgqnmbn6urPVt77eUocpbCF9f2ScEMu2HZwiFL3Viw
path m/0'/ (has to be the same for all for time comparison)
index: 1' (in order to make it fail and search the whole space in all cases)
(no passphrase)
SetBip32() call count time
BIP39 261,774 00:02:44
Electrum-Standard 16,464 00:00:12
Electrum-SegWit 1,064 00:00:02
Electrum-Legacy2FA 1,057 00:00:02
Electrum-SegWit2FA 1,015 00:00:02
The reason why the last 3 numbers are slightly different despite having the same checksum size is based on luck.
Another question, are there wallets that generate non-valid checksum mnemonics?
Not that I know of.