improved opcode selection based on param type