LotusScript Question: Performance when checking for an empty string

This is trivial question - something that will make only a small performance difference but has got me curious.

I had read that when checking for an empty string, it was quicker to use

IF Len(myString)=0 THEN …

rather than

IF myString=“” THEN …

http://www.lotusgeek.com/LotusGeekBlog.nsf/d6plinks/ROLR-6NTK2K

A friend tested this on Notes8.5 and confirmed a significant performance gain. I’ve tested this on Notes6.5 and Notes7 and consistently found the opposite. Using len is always much slower on earlier versions of Notes. I’d appreciate if a couple of people could try running the following code twice - commenting out the relevant line each time. Please post the results along with the version of Notes you used.

Sub Initialize

Dim startTime As Single, elapsedTime As Single                             'Used to time this agent

Dim strAnswer As String

Dim i As Long, test As Long

startTime! = Timer()



strAnswer="Lotus Notes String"

For i=1 To 100000000

’ If Len(strAnswer)=0 Then

	If strAnswer="" Then				

		test = i

	End If                  

Next i 



elapsedTime! = Timer() - startTime!                 'Stop the clock

Print "Completed in "; Format$(elapsedTime, "##0.00") ; " seconds"

Msgbox "Completed in "; Format$(elapsedTime, "##0.00") ; " seconds"

End Sub

This question is useful for the following open source application that is often used to compare hundred of thousands of field values

http://www.openntf.org/Projects/pmt.nsf/ProjectLookup/Data%20Moving%20Animal