x = Random[Integer, {(10^49), (10^50)}]
y = Random[Integer, {(10^49), (10^50)}]

GCD[x, y] // Timing

FactorInteger[x] // Timing

FactorInteger[y] // Timing

NextPrime[n_] := n + 1 /; PrimeQ[n + 1]
NextPrime[n_] := NextPrime[n + 1]

z = 
      NextPrime[Random[Integer, {(10^24), (10^25)}]]*
        NextPrime[Random[Integer, {(10^24), (10^25)}]]

FactorInteger[z] // Timing

Clear[factorinteger]
factorinteger[x_] := 
      Module[{z = x, teiler = 2, liste = {}, z1}, 
While[
            z > 1, 
While[IntegerQ[z1 = z/teiler], 
              AppendTo[liste, teiler]; z = z1]; 
If[
              teiler == 2, teiler = 3, 
              teiler = 
                NextPrime[
                  teiler]]]; 
liste
] /; 
        IntegerQ[x] && x > 1

x = 65176314651398250790

FactorInteger[x] // Timing

factorinteger[x] // Timing

Clear[factorinteger]
factorinteger[x_] := 
      Module[{z = x, teiler = 2, liste = {}, z1}, 
While[
            z > 1 && Not[PrimeQ[z]], 
While[
              IntegerQ[z1 = z/teiler], AppendTo[liste, teiler]; 
              z = z1]; 
If[teiler == 2, teiler = 3, 
              teiler = NextPrime[teiler]]]; 
If[PrimeQ[z], 
            AppendTo[liste, 
              z]]; 
liste
] /; 
        IntegerQ[x] && x > 1

factorinteger[x] // Timing

RSA576 = 
      188198812920607963838697239461650439807163563379417382700763356422988859715234665485319060606504743045317388011303396716199692321205734031879550656996221305168759307650257059

RSA576 - 
      398075086424064937397125500550386491199064362342526708406385189575946388957261768583317*472772146107435302536223071973048224632914695302097116459852171130520711256363590397527