SerializeHash used to create a memory-backed CDataStream, serialize the object (almost always a CTransaction) to it, and then feed it to SHA256. As most of the time is actually spent in allocating/deallocating the buffer, it is better to do the SHA256 in-place. That is what CHashWriter does.
On my system, in ultraprune running on a tmpfs-backed datadir, this alone reduces total CPU time spent during import of 185k blocks by 4-5%.