Somewhat...
Theres several ways to defend. For example, if u are at war OR you farm a lot, the optimal defnse wud b HC/Spear. This is faster to make during war time and has much better farming capabilities. Also, when stacking, you can get many more villages worth in one city because of its speed and the resource cost are balanced (wood for spears, iron for HC).
Spear/Sword, Sp/Sw/Archer doesn't really make much sense mathematically. The best defense for the purpose of defense is Archer/Sword, it is well balanced resources to build, and almost take an offense on farm space for farm space. But it takes TIME, about 4 minutes per unit on max barracks.
I am trying the first one currently because of how fast it gets troops out. VERY important in a war. Remember that farm space is not as large a matter in defense as it is in offense.