as a ship it was fast and agile , and became the dominant warship in the mediterranean from the 7th to the 4th centuries bc , when they were largely superseded by the larger quadriremes and quinqueremes .