The use of network coding has been shown to improve throughput in input-queued multicast switches, but not without costs of computational complexity and delays. In this paper, we investigate the design of efficient online network coding algorithms in a switch with multicast traffic. We present Haste, an online opportunistic coding algorithm designed to streamline the computation when network coding is involved in a network switch with multicast traffic. Haste enjoys the advantage of incurring no decoding delays, which reduces packet delays compared with existing network coding algorithms on switches. We have conducted extensive simulations to show the efficiency of Haste, and implemented an emulation framework to emulate input-queued switches using asynchronous network sockets. Our emulation framework is able to process actual UDP traffic using Haste with online network coding, and to show convincing evidence that Haste is suitable for practical use, and is beneficial in multicast swit...