Anonymous user
Cuban primes: Difference between revisions
m
changed some spellings of "cuban" (should be lower case) in some comments (but not any programs)..
m (added a note about not capitalizing "cuban".) |
m (changed some spellings of "cuban" (should be lower case) in some comments (but not any programs)..) |
||
Line 665:
=={{header|Visual Basic .NET}}==
===Corner Cutting Version===
This language doesn't have a built-in for a ''IsPrime()'' function, so I was surprised to find that this runs so quickly. It builds a list of primes while it is creating the table. Since the last item on the table is larger than the square root of the 100,000th
<lang vbnet>Module Module1
Dim primes As New List(Of Long)
Line 729:
Computation time was 0.2968064 seconds</pre>
===Snail Version===
This one doesn't take any shortcuts. It could be sped up (Execution time about 15 seconds) by threading chunks of the search for the 100,000th
<lang vbnet>Module Program
Dim primes As New List(Of Long)
|