In theory, if the heat is generated from within as is in an internal combustion engine, than black should shed the heat better by extracting the inner heat from itself with the help of an exterior black coating.
In opposite is a black roof lining attracting heat from the sun which in that case is an exterior heat source. That is why most roofs these days are painted either bright silver or white.
Nascar stock car engines have been painted black for ages probably for this theory actually being proven true.