[sword-devel] engine profiling

David Trotz dtrotzjr at crosswire.org
Tue Jul 22 21:13:34 MST 2008


BTW: I fixed a few compiler issues, but I do not seem to have write 
access to the sword lib. Here is my patch.
--
David

David Trotz wrote:
> Troy,
> Good news, after you went to sleep, I tried fully optimized code 
> (preferring speed over size) and I got the results we expected.
>
> For reference these are my old timings:
> ***********************************************
> OLD
>
> KJV version of Psalm 119 w/ all options off.
>
> <snip>
> m_modCurText->SetKey(keyCur);
>         0.009748 s
> sprintf(strNum, i"386483203", pvHeading++);
>         0.002622 s
> SWBuf preverseHeading = m_modCurText->getEntryAttributes()...
>         0.134881 s
> if (preverseHeading.length()) {...
>         0.000000 s
> s = GetVerseHeader(keyCur);...
>         0.062169 s
> s += (TCHAR *)m_modCurText->RenderText();...
>         4.705670 s
> s += ;
>         0.002992 s
> if (s.length() > 0) {...
>         0.094492 s
> if (keyCur.Verse() == GetMaxVerses())...
>         0.000000 s
> Total Time ...
>         5.036635 s
>
> </snip>
>
> ***********************************************
> NEW
>
> KJV version of Psalm 119 w/ all options off.
>
> <snip>
>
> m_modCurText->SetKey(keyCur);
>         0.008105
> sprintf(strNum, i"1472589783", pvHeading++);
>         0.002758
> SWBuf preverseHeading = m_modCurText->getEntryAttributes()...
>         0.021899
> if (preverseHeading.length()) {...
>         0.000000
> s = GetVerseHeader(keyCur);...
>         0.024966
> s += (TCHAR *)m_modCurText->RenderText();...
>         1.635440
> s += ;
>         0.001546
> if (s.length() > 0) {...
>         0.051099
> if (keyCur.Verse() == GetMaxVerses())...
>         0.000000
> Total Time ...
>         1.765442
>
> </snip>
>
> ***********************************************
>
> Much better results and more manageable. Thanks for looking more into 
> this. I really appreciate it.
>
> In Christ,
> David Trotz
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
>   

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sword_07222008.patch
Url: http://www.crosswire.org/pipermail/sword-devel/attachments/20080722/e02f3c93/attachment-0001.pl 


More information about the sword-devel mailing list