A Layer switch combines switching and routing in a single device. It routes between VLANs using hardware (ASICs) rather than software, achieving much higher performance.
Layer switches use Switched Virtual Interfaces (SVIs) to route between VLANs:
Switch(config)# ip routing
Switch(config)# interface vlan 10
Switch(config-if)# ip address 192.168.10.1 255.255.255.0
Switch(config)# interface vlan 20
Switch(config-if)# ip address 192.168.20.1 255.255.255.0
Traffic between VLANs stays within the switch. No external router needed. Throughput is limited only by the switch's backplane, often tens of gigabits per second.