I learned after my first melted cable in 1986. I mistakenly ordered a very short replacement cable- the 3 foot cable I got was actually better as there was less cable out there vulnerable to the heat from the headers. A simple curve from the shifter to the transmission linkage and much less "Slack" to zip tie and keep away from harmful heat. In other word- get a cable that's just long enough and no more.
X2.
Also, at least B&M offers both a 'standard' version and a 'heavy duty' version of their cables. The H.D. version has a thicker sheath but the standard/thinner sheath is a little more flexible which can help with routing.