Thanks for running that program on Xcode 10.1 (and macOS 10.14.4), interesting!
That makes one wonder what the results would be on a machine with macOS 10.14.3.
That is: Is version B not slow when compiled with Xcode 10.1 on macOS 10.14.3?
Perhaps the slow down in type checking has something to do with parts of Swift being in the OS as of macOS 10.14.4?