Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15072

1 billion times for test Mod, a variety of programming languages running speed

$
0
0
Don't publish topics that are not related to the test.
It is just used to simply test the algorithm of different programming languages for the remainder function, and compare the performance.
Not for reference, for entertainment only.
For example, CHROME JS is several times faster than IE 11.
VBS is much slower than VBA

vb6
Code:

Private Declare Function timeBeginPeriod Lib "winmm.dll" _
  (ByVal uPeriod As Long) As Long
 Private Declare Function timeGetTime Lib "winmm.dll" () As Long
Private Sub Command2_Click()
timeBeginPeriod 1
Dim START As Long, UsedTime As Long

Dim i As Long
Dim C As Long
Dim v As Long
v = 10 ^ 9 '10亿
START = timeGetTime
For i = 1 To v
    If i Mod 7 = 0 Then C = C + 1
Next
UsedTime = timeGetTime - START
MsgBox "VB6 USED TIME:" & (UsedTime / 1000) & " SEC " & vbCrLf & ",Find Counts:" & C
end sub


Viewing all articles
Browse latest Browse all 15072

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>