fb:porticula NoPaste
Vergleich Divisionen
Uploader: | MOD |
Datum/Zeit: | 17.05.2010 18:39:44 |
/'
Vorteil Int() mit normaler Division gegenüber Integerdivision!?
'/
Dim As Double s1, s2, e1, e2
Dim As Integer a1, a2
Dim As Integer i1, i2
s1 = Timer
For i1 = 1 To 1000000000
a1 = (40\2)*3
Next
e1 = Timer - s1
s2 = Timer
For i2 = 1 To 1000000000
a2 = Int(40/2)*3
Next
e2 = Timer - s2
Print a1, a2
Print
Print "Backslash: " & e1
Print "Funktion: " & e2
Print
If e1 > e2 Then
Print "Vorteil Funktion: " & e1 - e2
ElseIf e1 < e2 Then
Print "Vorteil Backslash: " & e2 - e1
Else
Print "Gleich"
EndIf
Sleep