Remove switch statement on `invokeMethod` calls for performance.