1. Home
  2. Computing & Technology
  3. Visual Basic

Which is faster? VB 6 or VB.NET?

By , About.com Guide

6 of 8

The Benchmark Code - Part 2

      x = 100000 ' the length of the primes list
      If x > MaxPrimesStored Then Exit Sub
      Primes(1) = 2
      PrimesFound = 1
      NumberToTest = 3
      Do While PrimesFound < x
         Factor = 0
         For n = 1 To PrimesFound
            If Primes(n) * Primes(n) > _
         NumberToTest Then Exit For
            Remainder = _
         NumberToTest / Primes(n) - _
         Int(NumberToTest / Primes(n))
            If Remainder = 0 _
         Then Factor = Factor + 1
            If Factor = 1 Then Exit For
         Next n
Explore Visual Basic
By Category
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic
  4. Opinions and Humor
  5. A benchmark investigation into the relative performance speed of VB 6 versus VB.NET

©2009 About.com, a part of The New York Times Company.

All rights reserved.