Optimize match with switch annotation