fb:porticula NoPaste
frebas, glaub mir endlich... BYREF ist schneller.
Uploader: | Jojo |
Datum/Zeit: | 15.03.2010 21:49:26 |
Type gross
As Integer hierEinInteger
As Double daEinDouble
As String * 1000 undDortEinString
End Type
Sub CallByValue(ByVal a As gross)
a.hierEinInteger += 1
a.daEinDouble += 1
End Sub
Sub CallByReference(ByRef a As gross)
a.hierEinInteger += 1
a.daEinDouble += 1
End Sub
#Define trial 100000000
Dim As gross a
Dim As Double start = timer
For i As UInteger = 1 To trial
CallByValue(a)
Next
Print Timer - start
start = Timer
For i As UInteger = 1 To trial
CallByReference(a)
Next
Print Timer - start
Sleep