358 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Jobs | Twitter | Bookmarks | Pods | Forum | Blogs | Search | myPL | About 
 
Latest 7 Posts
Wishmap
Tue, Jun 22nd 2010 52
Quickr 8.2.0.9 + Domino 8.5.1FP1 = Stable!
Tue, Feb 2nd 2010 181
Easy
Wed, Jan 27th 2010 32
Multithreading can be cores times slower or cores times faster than single threading
Tue, Dec 15th 2009 93
Layers and Outlines
Fri, Dec 11th 2009 66
Debian 5.0 GNU C++ makes the fastest code
Wed, Dec 9th 2009 52
Goodbye Firefox!
Thu, Nov 26th 2009 45
Top 10
Quickr 8.2.0.9 + Domino 8.5.1FP1 = Stable!
Tue, Feb 2nd 2010 181
IBM Lotus Notes/Domino 9
Tue, Oct 2nd 2007 104
Multithreading can be cores times slower or cores times faster than single threading
Tue, Dec 15th 2009 93
Fine tuning the Notes 8 Mail template
Wed, Sep 12th 2007 85
AIX - change size of file system
Wed, Mar 5th 2008 85
The death of openSUSE
Sat, Nov 14th 2009 80
Domino 7.0.3 is still the most stable release
Mon, Feb 2nd 2009 70
Layers and Outlines
Fri, Dec 11th 2009 66
Debian 5.0 GNU C++ makes the fastest code
Wed, Dec 9th 2009 52
Wishmap
Tue, Jun 22nd 2010 52


LotusScript: over 780% faster checking for empty strings
   

I read on planetlotus.org about Bob Balaban's test of the speed difference between s="" vs len(s)=0 checking ( http://www-10.lotus.com/ldd/bpmpblog.nsf/dx/performance-testing-technique ). My test agent looks like this:
Sub Initialize    Dim n As Long, ni As Long    n=10 ' number of test repeats    ni=0    Dim t1 As Double, t2 As Double, tn As Double, tt As Double    Dim i As Integer, j As Integer, k As Long    Const x=10000    Const s="xxxxxxxxxx"    For ni=1 To n       t1=Timer       For i=1 To x          For j=1 To x             k=Len(s)=0          Next       Next       t2=Timer       tn=t2-t1       tt=tt+tn       Print ni & ":" & Format(tn,"00000.00000") & "s."    Next    Print "Average:" & tt / n End Sub
The line with k=Len(s)=0 varied and gave the following average timings over 10 tests:
(Const s="")k=Len(s)=07.532s
(Const s="")k=s<>""58.938s
(Const s="xxxxxxxxxx")k=Len(s)=07.688s
(Const s="xxxxxxxxxx)k=s<>""63.089s
That means, even with small loops like 1 billion iterations, you get almost a minute faster results! Anyway, the number of iterations is not so important and you can't really judge on that, as someone might need even bigger iterations, but the fact that it's over 780% faster to use len(s) is important. I don't think it's concidence that several people started to blog about LotusScript performance practices, just after I started to think about revising the LotusSphere 2007 LotusScript speed presentation, but before I even posted anything on my blog. I think there is somekind of shared mind, which we can't explain scientifically yet.

---------------------
http://siipi.com/public/mika.nsf/blogs/D6BBAE5154ACDFDFC22573FC006192BB
Feb 27, 2008
22 hits



Recent Blog Posts
52


Wishmap
Tue, Jun 22nd 2010 7:46p   Mika Heinonen
[read] Keywords:
181


Quickr 8.2.0.9 + Domino 8.5.1FP1 = Stable!
Tue, Feb 2nd 2010 1:44p   Mika Heinonen
[read] Keywords: domino nsd quickr
32


Easy
Wed, Jan 27th 2010 11:05a   Mika Heinonen
[read] Keywords:
93


Multithreading can be cores times slower or cores times faster than single threading
Tue, Dec 15th 2009 3:25p   Mika Heinonen
[read] Keywords:
66


Layers and Outlines
Fri, Dec 11th 2009 4:45p   Mika Heinonen
[read] Keywords: forms notes development
52


Debian 5.0 GNU C++ makes the fastest code
Wed, Dec 9th 2009 3:04p   Mika Heinonen
[read] Keywords:




45


Goodbye Firefox!
Thu, Nov 26th 2009 1:08p   Mika Heinonen
[read] Keywords: notes ajax firefox google linux mac profile security
80


The death of openSUSE
Sat, Nov 14th 2009 6:25p   Mika Heinonen
[read] Keywords: ibm linux microsoft vista ubuntu
36


Functional and financial thoughts about IT systems
Tue, Nov 10th 2009 3:24p   Mika Heinonen
[read] Keywords: domino ibm lotusscript notes rich text aix apple applications database desktop development linux microsoft mysql oracle server sql vista vm ubuntu
41


Oracle tries to kill SUN
Thu, Oct 22nd 2009 3:46p   Mika Heinonen
[read] Keywords: domino ibm applications database microsoft mysql oracle sharepoint




Created and Maintained by Yancy Lent - About - Blog Submission - Suggestions - Change Log - Blog Widget - Advertising - FAQ - Mobile Edition