Even small railguns have a penetration value in excess of any ship's armor hardness, so they do full damage (less thermic/kinetic resistance, of course) to all human ships. They also cycle faster than mediums.
However, medium rails still do more damage per shot, more damage over a given length of time, and more damage between reloads.