I don't ever lube new cables/housing. All it does is cause dirt and grit to stick to the cable and then get pulled into the housing.
yup, I does more harm that good in my experience.
The only exception for me is I lube a certain part of the cable inside the shifter. Not to improve shifting but I've had a few cables fray badly under the shifter hoods and my thinking is no crud will get in there and it'll reduce the friction and at least delay any fraying. I don't know if it helps or not but I doesn't hurt like lubing in exposed areas so I figure why not.
FWIW: And not commenting on its performance/utility, but Shimano sells "Special Grease SP41" for cables. Perhaps it's good, or perhaps it's just something cooked up by Shimano marketing to separate the gullible consumer from his cash? The truth likely lies somewhere between those two extremes.
"The unique low friction formula is specifically designed to lubricate SIS shift cables and housings for trouble free performance in all weather conditions. 50g. jar."