Yes, the Titan X (if it’s the Pascal version) is much faster than the K40. That performance difference doesn’t surprise me at all, and you can get even bigger gaps between Kepler and Pascal (I’ve seen up to 6x) if you’re using FP16 or your task is very heavy on memory bandwidth.