Stock to stock, depends on the condition of the engine. I've seen abused H22 engines running slower than a good healthy D series. Most of these engines have been abused now, with low compression, bad tunes and oil problems, with almost a non existent concept of rebuilding/refreshing within specs.
The other factor is traction. Considering both cars have good traction and equally healthy engines, the B would run circles around a Suzuki G15 swapped Khyber.