10001th prime: Difference between revisions

m
m (Python, QB64 - should be header: subheader, not two headers)
m (→‎{{header|C#|CSharp}}: subtitle added)
Line 201:
 
=={{header|C#|CSharp}}==
===Sieve vs Trial Division===
Comparing performance of the one-at-a-time trial division method vs the sieve of Eratosthenes method. About ten times faster for the sieve. It may appear that the sieve may be off by one, <code>pr[10000]</code> but since the array is zero based, it's the 10001st value.
<lang csharp>using System; class Program {
Line 234 ⟶ 235:
104,743 3.8943 ms 104,743 357.9 μs 10.881 times faster</pre>
 
===AlternateAlternative Trial Division Method===
<lang csharp>using System; using System.Text; // PRIME_numb.cs russian DANILIN
namespace p10001 // 1 second 10001 104743