Ask an engineer to design something that's good, quick, and cheap. He'll tell you "Pick two". I bring that up because you want your ship to have three properties: 1) Small. 2) Agile. 3) Enough firepower to fend off a battleship. Pick two. If you make it small, will either have room for power plants, or guns, but not both. If you make it fast, it can either be small, or carry big guns. If you carry a large broadside, you can either get small (well, medium-sized), or fast.
Aside from the engineering impossibility of getting all three properties in one hull, just the requirement that a fast ship have the gun power to fend off a battleship is a very tricky proposition. Several people have suggested a ship with 4x15" guns. For a variety of technical reasons, most navies had concluded that six guns were pretty much the minimum for effective long-range gunnery. Even assuming that you can pull decent gunnery with four guns, you still have a major problem. To "fend off" a battleship, you need some area where your guns are superior to the battleship's guns. If you have a range advantage, you can stand back and (hopefully) degrade your target before it can close range on you. If your guns are harder-hitting, you might (emphasis on might) be able to cripple a battleship before it can return the favor. Unfortunately, even with 4x15", you don't have any margin of superiority in either range or hitting power. Any battleship commander coming upon such a ship isn't going to be "concerned" by those four guns...after all, he knows his ship can take a pounding, while yours can't, and he also knows that he has twice your gun power (or more). All you're doing by up-gunning a Panzerschiff is throwing good money after bad, and wasting good guns on a bad idea. The Panzerschiffe were born out of political, rather than operational constraints, and that almost never ends well (the aircraft carriers converted to save Washington Treaty battleship / battlecruiser hulls were the exception that proves the rule).
Although this appears to be logical reasoning, I don't believe it matches up all that well with reality.
Heavy armament or armour or both don't seem to cost as much to size as high speed does. The problem is that high speed requires a long fine hull and a LOT of installed power. Check out the sizes of the Great War battleships and their equivalent battle cruisers. The Battle Cruisers for a few knots extra speed, a LOT less armour and less main armament were much larger ships.
There was a question at one point about why Cruiser machinery was able to achieve nearly as much power with a lot less weight than Capital Ship machinery. I am not quite sure what the real answer was.
The most important point I am trying to make here is that as soon as high speed becomes a requirement, the size of the ship increases drastically as does the cost At that point, you have plenty of room to add heavy armament. If on the other hand, you choose to add armour, the cascading effect starts where you will need more power to push that greater displacement through the water.....
As an example, compare the Washington and South Dakota class BBs to the Iowa class. The armament and armour isn't that different but the extra speed cost around 10,000 tons extra displacement.
- Ivan.