3 ms·
Ah, that's what you meant. Your previous comment reads as if an opaque class results in faster compilation than a void pointer, but those are the same as far as
by hvdijk 5y ago
Ah, that's what you meant. Your previous comment reads as if an opaque class results in faster compilation than a void pointer, but those are the same as far as that goes, and you were comparing both to a non-pimpl version.
- chippiewill 5y agoThere might be a few hundred CPU cycles saved in compilation from not having to static cast the void* pointer to the implementation class.
- hvdijk 5y agoHaha, sure, and the other way around, time is spent constructing the compile-time type info for the pimpl class. Let's ignore both since the impact would be so small it would almost certainly be drowned out by all the random noise that happens all the time.
- not2b 5y agoYes, I was comparing class Foo; to #include "Foo.h" and I would not consider using a void pointer for anything other than an allocator.