switch/generic: Performance enhancement