title: Did I just prove that sieve of Eratosthenes is less efficient than trial division?
body: <p>I was trying to compare the run-time speed of two algorithms: A brute-force C program to print prime numbers (10,000 numbers), and a Sieve of Eratosthenes C program (also 10,000 prime numbers).</p>
  
  <p>My measured run-time for the sieve algorithm was: 0.744 seconds</p>
  
  <p>My measured run-time for the brute-force algorithm was: 0.262 seconds</p>
  
  <p>However, I was told that the Sieve of Eratosthenes algorithm is more efficient than the brute-force method, and so I thought it would run <em>faster</em>.  So either I'm wrong or my program is flawed (which I doubt).</p>
  
  <p>Therefore, my question is: <strong>Since I got the opposite results than what I expected, does this prove that the Sieve of Eratosthenes really is the <em>less</em> efficient algorithm in terms of speed, compared to the trial division?</strong> </p>
  
  <p>I'm not sure if it is of any relevance, but I'm using the Dev C++ compiler and Windows 7.</p>