Using a ladder-type polymer in an optical microcavity in strong coupling, we demonstrate an all-optical transistor with record net gain of ~10 dB/μm, sub-ps switching time, cascaded amplification and all-optical logic operation at ambient conditions.