Single-threaded performance is higher thanks to higher clock frequency, whereas multi-threading is a lot faster thanks to the inclusion of Hyper-Threading.
A Comet Lake-S model (10400) has hyperthreading enabled, unlike its predecessor. This means that the 10400 has 12 threads while 9400(F) has 6 threads. They do share the same base clock of 2.9 GHz, but the newer model features a 4.3 GHz boost clock (meaning there’s a 200 MHz upgrade over the last generation).