Regarding carbon fiber versus steel, bear in mind that when you search on a phrase like “stiffness of carbon fiber compared to steel”, most of what you are likely to see pertains to carbon fiber as a raw material, whereas the actual stiffness of a finished CF tube will depend on a variety of factors. Chief among them:
1. the orientation of the fibers – e.g. woven vs unidirectional
2. the type of fibers – low / intermediate / high / ultra-high modulus fibers
3. the epoxy that bonds them together - ratio of carbon fiber to epoxy
So there’s quite a bit of variability possible. When speaking of the stiffness of a material, the property of interest is the modulus of elasticity. Hereafter I will abbreviate this property as simply _modulus_ but you may want to simply substitute the word _stiffness_, since in this context we are comparing materials of the same size and shape.
Common or “standard” carbon fiber, to the extent there is such a thing, has a modulus that is basically the same as mild steel (~200 GPa). However when processed into the typical woven arrangement (a 0/90 layup in the industry terms), it will have a modulus only about 1/3 that of steel (~70 GPa). At the same time, the carbon fiber will only weigh 1/5 that of steel so the stiffness-to-weight ratio (its specific modulus) is still better than steel. But if stiffness is the paramount goal and you don’t care about the weight, you are better off with a solid steel barrel.
With that said, there are some carbon fiber compositions whose modulus exceeds that of steel, using ultra-high modulus (UHM) fibers oriented in a unidirectional layup. Maybe some other magic sauce in the mix. If memory serves, they can get up to 1.5x the modulus of steel. As expected, these are more expensive and are marketed as such.
Regarding the question of temperature sensitivity, carbon fiber does have a very low coefficient of thermal expansion. How much depends on its construction but for the common woven type, it’s about 1/8 that of steel…i.e. steel is 8x higher. That’s the motivation behind the practice of using Belleville washers to tension a barrel to a carbon-fiber tube. A series stack of spring washers essentially takes up the elongation / shrink of the steel to maintain a relatively constant amount of tension.
With all that said, a few questions may be swirling in your brain:
1. How much stiffness is enough?
2. What kind of improvement can I expect if I do X and Y?
3. Do I really need to worry about thermal expansion?
4. Where does “more is better” slam hard against the wall of diminishing returns?
Well, those are much harder questions to answer. They scoop up a bunch of other considerations like cost and effort, the type of shooting you’ll be doing, the degree of precision you want, and so forth. I don’t think we have anything approaching a consensus or a cookbook-type recipe to follow. Still, I do hope the above information is helpful as a starting point.