No, those are both carbine length gas.
It is best on 14.5" and shorter barrels.
A mid length gas (like what I linked) is best with 16-18" barrels.
It is smoother, less violent and more reliable.
Plus, if you add a rail later down the road you have more room to mount things. Even without a...