sl@0
|
1 |
// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
#include <e32test.h>
|
sl@0
|
17 |
|
sl@0
|
18 |
static RTest TheTest(_L("T_FoldPerf"));
|
sl@0
|
19 |
|
sl@0
|
20 |
#define ARRAY_SIZE(ar) (sizeof(ar) / (sizeof(ar[0])))
|
sl@0
|
21 |
|
sl@0
|
22 |
const TText16 KText16[] = {'1', 'f', 'A', 0x01D5, 'k', '5', 'g', 'U', 'W', 'q', 'a',
|
sl@0
|
23 |
0x095E, 0x01D5, 'a', 'B', 'c', 'd', 'E', 'F', 0};
|
sl@0
|
24 |
//0x095E - DEVANAGARI LETTER FA
|
sl@0
|
25 |
//decomposed to: 0x092B 0x093C
|
sl@0
|
26 |
//0x01D5 - LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON
|
sl@0
|
27 |
//decomposed to: 0x0075 0x0308 0x0304
|
sl@0
|
28 |
|
sl@0
|
29 |
_LIT16(KPlainText, "abcdefghijklmnopqrst");
|
sl@0
|
30 |
|
sl@0
|
31 |
/**
|
sl@0
|
32 |
@SYMTestCaseID SYSLIB-UNICODE-CT-0108
|
sl@0
|
33 |
@SYMTestCaseDesc FindF - performance test
|
sl@0
|
34 |
@SYMTestPriority High
|
sl@0
|
35 |
@SYMTestActions FindF - performance test
|
sl@0
|
36 |
@SYMTestExpectedResults The test must not fail.
|
sl@0
|
37 |
@SYMPREQ814 Optimise folded string comparisons.
|
sl@0
|
38 |
*/
|
sl@0
|
39 |
static void FindF_PerformanceTest()
|
sl@0
|
40 |
{
|
sl@0
|
41 |
TheTest.Next(_L("FindF test"));
|
sl@0
|
42 |
|
sl@0
|
43 |
TBufC16<ARRAY_SIZE(KText16) - 1> text(KText16);
|
sl@0
|
44 |
|
sl@0
|
45 |
TBufC16<3> searchStr1(_L16("gUw"));
|
sl@0
|
46 |
|
sl@0
|
47 |
const TText16 searchText2[] = {0x01D5, 'A', 'b', 0};
|
sl@0
|
48 |
TBufC16<ARRAY_SIZE(searchText2) - 1> searchStr2(searchText2);
|
sl@0
|
49 |
|
sl@0
|
50 |
const TText16 searchText3[] = {0x0075, 0x0308, 0x0304, 'A', 'b', 0};
|
sl@0
|
51 |
TBufC16<ARRAY_SIZE(searchText3) - 1> searchStr3(searchText3);
|
sl@0
|
52 |
|
sl@0
|
53 |
const TText16 searchText4[] = {0x095E, 'd', 'A', 'b', 0};
|
sl@0
|
54 |
TBufC16<ARRAY_SIZE(searchText4) - 1> searchStr4(searchText4);
|
sl@0
|
55 |
|
sl@0
|
56 |
const TText16 searchText5[] = {0x095E, 0x0055, 0x0308, 0x0304, 'A', 'b', 'C', 0};
|
sl@0
|
57 |
TBufC16<ARRAY_SIZE(searchText5) - 1> searchStr5(searchText5);
|
sl@0
|
58 |
|
sl@0
|
59 |
TBufC16<4> searchStr6(_L16("CDEF"));
|
sl@0
|
60 |
|
sl@0
|
61 |
TUint timeStart = User::TickCount();
|
sl@0
|
62 |
for(TInt i=0;i<10000;++i)
|
sl@0
|
63 |
{
|
sl@0
|
64 |
TInt res = text.FindF(searchStr1);
|
sl@0
|
65 |
TheTest(res == 6);//searchStr1 starts at position 6
|
sl@0
|
66 |
|
sl@0
|
67 |
res = text.FindF(searchStr2);
|
sl@0
|
68 |
TheTest(res == 12);
|
sl@0
|
69 |
|
sl@0
|
70 |
res = text.FindF(searchStr3);
|
sl@0
|
71 |
TheTest(res == 12);
|
sl@0
|
72 |
|
sl@0
|
73 |
res = text.FindF(searchStr4);
|
sl@0
|
74 |
TheTest(res == KErrNotFound);
|
sl@0
|
75 |
|
sl@0
|
76 |
res = text.FindF(searchStr5);
|
sl@0
|
77 |
TheTest(res == 11);
|
sl@0
|
78 |
|
sl@0
|
79 |
res = text.FindF(searchStr6);
|
sl@0
|
80 |
TheTest(res == 15);
|
sl@0
|
81 |
}
|
sl@0
|
82 |
TUint timeEnd = User::TickCount();
|
sl@0
|
83 |
TheTest.Printf(_L("Time = %d ticks\n"), timeEnd - timeStart);
|
sl@0
|
84 |
}
|
sl@0
|
85 |
|
sl@0
|
86 |
/**
|
sl@0
|
87 |
@SYMTestCaseID SYSLIB-UNICODE-CT-0109
|
sl@0
|
88 |
@SYMTestCaseDesc MatchF - performance test
|
sl@0
|
89 |
@SYMTestPriority High
|
sl@0
|
90 |
@SYMTestActions MatchF - performance test
|
sl@0
|
91 |
@SYMTestExpectedResults The test must not fail.
|
sl@0
|
92 |
@SYMPREQ814 Optimise folded string comparisons.
|
sl@0
|
93 |
*/
|
sl@0
|
94 |
static void MatchF_PerformanceTest()
|
sl@0
|
95 |
{
|
sl@0
|
96 |
TheTest.Next(_L("MatchF test"));
|
sl@0
|
97 |
|
sl@0
|
98 |
TBufC16<ARRAY_SIZE(KText16) - 1> text(KText16);
|
sl@0
|
99 |
|
sl@0
|
100 |
TBufC16<11> searchStr1(_L16("*fa??5*W*a*"));
|
sl@0
|
101 |
|
sl@0
|
102 |
const TText16 searchText2[] = {'*', 0x01D5, 'A', '?', 'C', '*', 0};
|
sl@0
|
103 |
TBufC16<ARRAY_SIZE(searchText2) - 1> searchStr2(searchText2);
|
sl@0
|
104 |
|
sl@0
|
105 |
const TText16 searchText3[] = {'*', 0x0075, 0x0308, 0x0304, '*', 'e', 'F', 0};
|
sl@0
|
106 |
TBufC16<ARRAY_SIZE(searchText3) - 1> searchStr3(searchText3);
|
sl@0
|
107 |
|
sl@0
|
108 |
const TText16 searchText4[] = {'1', '*', 'A', 'b', '*', 0};
|
sl@0
|
109 |
TBufC16<ARRAY_SIZE(searchText4) - 1> searchStr4(searchText4);
|
sl@0
|
110 |
|
sl@0
|
111 |
TBufC16<11> searchStr5(_L16("*fa?z5*W*a*"));
|
sl@0
|
112 |
|
sl@0
|
113 |
TBufC16<5> searchStr6(_L16("a?v?T"));
|
sl@0
|
114 |
|
sl@0
|
115 |
TUint timeStart = User::TickCount();
|
sl@0
|
116 |
for(TInt i=0;i<10000;++i)
|
sl@0
|
117 |
{
|
sl@0
|
118 |
TInt res = text.MatchF(searchStr1);
|
sl@0
|
119 |
TheTest(res == 1);
|
sl@0
|
120 |
|
sl@0
|
121 |
res = text.MatchF(searchStr2);
|
sl@0
|
122 |
TheTest(res == 12);
|
sl@0
|
123 |
|
sl@0
|
124 |
res = text.MatchF(searchStr3);
|
sl@0
|
125 |
TheTest(res == 3);
|
sl@0
|
126 |
|
sl@0
|
127 |
res = text.MatchF(searchStr4);
|
sl@0
|
128 |
TheTest(res == 0);
|
sl@0
|
129 |
|
sl@0
|
130 |
res = text.MatchF(searchStr5);
|
sl@0
|
131 |
TheTest(res == KErrNotFound);
|
sl@0
|
132 |
|
sl@0
|
133 |
res = text.MatchF(searchStr6);
|
sl@0
|
134 |
TheTest(res == KErrNotFound);
|
sl@0
|
135 |
}
|
sl@0
|
136 |
TUint timeEnd = User::TickCount();
|
sl@0
|
137 |
TheTest.Printf(_L("Time = %d ticks\n"), timeEnd - timeStart);
|
sl@0
|
138 |
}
|
sl@0
|
139 |
|
sl@0
|
140 |
/**
|
sl@0
|
141 |
@SYMTestCaseID SYSLIB-UNICODE-CT-0110
|
sl@0
|
142 |
@SYMTestCaseDesc CompareF - performance test
|
sl@0
|
143 |
@SYMTestPriority High
|
sl@0
|
144 |
@SYMTestActions CompareF - performance test
|
sl@0
|
145 |
@SYMTestExpectedResults The test must not fail.
|
sl@0
|
146 |
@SYMPREQ814 Optimise folded string comparisons.
|
sl@0
|
147 |
*/
|
sl@0
|
148 |
static void CompareF_PerformanceTest()
|
sl@0
|
149 |
{
|
sl@0
|
150 |
TheTest.Next(_L("CompareF test"));
|
sl@0
|
151 |
|
sl@0
|
152 |
TBufC16<ARRAY_SIZE(KText16) - 1> text(KText16);
|
sl@0
|
153 |
|
sl@0
|
154 |
const TText16 text1[] = {'1', 'F', 'A', 0x01D5, 'k', '5', 'G', 'U', 'W', 'Q', 'A',
|
sl@0
|
155 |
0x095E, 0x01D5, 'a', 'B', 'C', 'd', 'E', 'F', 0};
|
sl@0
|
156 |
TBufC16<ARRAY_SIZE(text1) - 1> str1(text1);
|
sl@0
|
157 |
|
sl@0
|
158 |
TBufC16<19> str2(_L16("1234567890123456789"));
|
sl@0
|
159 |
|
sl@0
|
160 |
TBufC16<19> str3(_L16("1fA4G6789r1d34z6789"));
|
sl@0
|
161 |
|
sl@0
|
162 |
TUint timeStart = User::TickCount();
|
sl@0
|
163 |
TInt i;
|
sl@0
|
164 |
for(i=0;i<10000;++i)
|
sl@0
|
165 |
{
|
sl@0
|
166 |
TInt res = text.CompareF(str1);
|
sl@0
|
167 |
TheTest(res == 0);
|
sl@0
|
168 |
|
sl@0
|
169 |
res = text.CompareF(str2);
|
sl@0
|
170 |
TheTest(res != 0);
|
sl@0
|
171 |
|
sl@0
|
172 |
res = text.CompareF(str3);
|
sl@0
|
173 |
TheTest(res != 0);
|
sl@0
|
174 |
}
|
sl@0
|
175 |
TUint timeEnd = User::TickCount();
|
sl@0
|
176 |
TheTest.Printf(_L("1. Time = %d ticks\n"), timeEnd - timeStart);
|
sl@0
|
177 |
|
sl@0
|
178 |
TBufC16<20> str4(_L16("abc3456hijklmnopqrst"));
|
sl@0
|
179 |
timeStart = User::TickCount();
|
sl@0
|
180 |
for(i=0;i<10000;++i)
|
sl@0
|
181 |
{
|
sl@0
|
182 |
TInt res = str4.CompareF(KPlainText);
|
sl@0
|
183 |
TheTest(res != 0);
|
sl@0
|
184 |
}
|
sl@0
|
185 |
timeEnd = User::TickCount();
|
sl@0
|
186 |
TheTest.Printf(_L("2. Time = %d ticks\n"), timeEnd - timeStart);
|
sl@0
|
187 |
|
sl@0
|
188 |
}
|
sl@0
|
189 |
|
sl@0
|
190 |
/**
|
sl@0
|
191 |
@SYMTestCaseID SYSLIB-UNICODE-CT-0114
|
sl@0
|
192 |
@SYMTestCaseDesc FindF(), CompareF(), MatchF() on plain (no combining characters) text
|
sl@0
|
193 |
@SYMTestPriority High
|
sl@0
|
194 |
@SYMTestActions Performance test
|
sl@0
|
195 |
@SYMTestExpectedResults The test must not fail.
|
sl@0
|
196 |
@SYMPREQ814 Optimise folded string comparisons.
|
sl@0
|
197 |
*/
|
sl@0
|
198 |
static void PlainTextPerformanceTest()
|
sl@0
|
199 |
{
|
sl@0
|
200 |
TheTest.Next(_L("Plain text - performance test"));
|
sl@0
|
201 |
|
sl@0
|
202 |
TInt res;
|
sl@0
|
203 |
TInt i;
|
sl@0
|
204 |
|
sl@0
|
205 |
TBufC16<20> str1(_L16("abcdefghijklmnopqrst"));
|
sl@0
|
206 |
TBufC16<20> str2(_L16("abcDefghIjklmNOpqrsT"));
|
sl@0
|
207 |
TBufC16<20> str3(_L16("abcDefghIjKlmNOp2rsT"));
|
sl@0
|
208 |
|
sl@0
|
209 |
TUint timeStart = User::TickCount();
|
sl@0
|
210 |
for(i=0;i<10000;++i)
|
sl@0
|
211 |
{
|
sl@0
|
212 |
res = KPlainText().CompareF(str1);
|
sl@0
|
213 |
TheTest(res == 0);
|
sl@0
|
214 |
res = KPlainText().CompareF(str2);
|
sl@0
|
215 |
TheTest(res == 0);
|
sl@0
|
216 |
res = KPlainText().CompareF(str3);
|
sl@0
|
217 |
TheTest(res != 0);
|
sl@0
|
218 |
}
|
sl@0
|
219 |
TUint timeEnd = User::TickCount();
|
sl@0
|
220 |
TheTest.Printf(_L("CompareF() Time = %d ticks\n"), timeEnd - timeStart);
|
sl@0
|
221 |
|
sl@0
|
222 |
TBufC16<20> str4(_L16("gHiJk"));
|
sl@0
|
223 |
TBufC16<20> str5(_L16("Opqr"));
|
sl@0
|
224 |
TBufC16<20> str6(_L16("2rsT"));
|
sl@0
|
225 |
|
sl@0
|
226 |
timeStart = User::TickCount();
|
sl@0
|
227 |
for(i=0;i<10000;++i)
|
sl@0
|
228 |
{
|
sl@0
|
229 |
res = KPlainText().FindF(str4);
|
sl@0
|
230 |
TheTest(res == 6);
|
sl@0
|
231 |
res = KPlainText().FindF(str5);
|
sl@0
|
232 |
TheTest(res == 14);
|
sl@0
|
233 |
res = KPlainText().FindF(str6);
|
sl@0
|
234 |
TheTest(res == KErrNotFound);
|
sl@0
|
235 |
}
|
sl@0
|
236 |
timeEnd = User::TickCount();
|
sl@0
|
237 |
TheTest.Printf(_L("FindF() Time = %d ticks\n"), timeEnd - timeStart);
|
sl@0
|
238 |
|
sl@0
|
239 |
TBufC16<20> str7(_L16("*gHiJk*op??sT"));
|
sl@0
|
240 |
TBufC16<20> str8(_L16("aBC*rst"));
|
sl@0
|
241 |
TBufC16<20> str9(_L16("ab?D*2rsT"));
|
sl@0
|
242 |
|
sl@0
|
243 |
timeStart = User::TickCount();
|
sl@0
|
244 |
for(i=0;i<10000;++i)
|
sl@0
|
245 |
{
|
sl@0
|
246 |
res = KPlainText().MatchF(str7);
|
sl@0
|
247 |
TheTest(res == 6);
|
sl@0
|
248 |
res = KPlainText().MatchF(str8);
|
sl@0
|
249 |
TheTest(res == 0);
|
sl@0
|
250 |
res = KPlainText().MatchF(str9);
|
sl@0
|
251 |
TheTest(res == KErrNotFound);
|
sl@0
|
252 |
}
|
sl@0
|
253 |
timeEnd = User::TickCount();
|
sl@0
|
254 |
TheTest.Printf(_L("MatchF() Time = %d ticks\n"), timeEnd - timeStart);
|
sl@0
|
255 |
|
sl@0
|
256 |
TBufC16<21> str10(_L16("abcdefghijklmnopqrst"));
|
sl@0
|
257 |
TBufC16<20> str11(_L16("*xyz*"));
|
sl@0
|
258 |
TBufC16<20> str12(_L16("xyz"));
|
sl@0
|
259 |
|
sl@0
|
260 |
timeStart = User::TickCount();
|
sl@0
|
261 |
for(i=0;i<10000;++i)
|
sl@0
|
262 |
{
|
sl@0
|
263 |
res = str10.FindF(str12);
|
sl@0
|
264 |
TheTest(res == KErrNotFound);
|
sl@0
|
265 |
}
|
sl@0
|
266 |
timeEnd = User::TickCount();
|
sl@0
|
267 |
TheTest.Printf(_L("Nonmatching string. FindF() Time = %d ticks\n"), timeEnd - timeStart);
|
sl@0
|
268 |
|
sl@0
|
269 |
timeStart = User::TickCount();
|
sl@0
|
270 |
for(i=0;i<10000;++i)
|
sl@0
|
271 |
{
|
sl@0
|
272 |
res = str10.MatchF(str11);
|
sl@0
|
273 |
TheTest(res == KErrNotFound);
|
sl@0
|
274 |
res = str10.MatchF(str12);
|
sl@0
|
275 |
TheTest(res == KErrNotFound);
|
sl@0
|
276 |
}
|
sl@0
|
277 |
timeEnd = User::TickCount();
|
sl@0
|
278 |
TheTest.Printf(_L("Nonmatching string. MatchF() Time = %d ticks\n"), timeEnd - timeStart);
|
sl@0
|
279 |
}
|
sl@0
|
280 |
|
sl@0
|
281 |
static void RunComparison_PerformanceTest(TInt aNumberOfTimes, TDesC& aOriginalText, TDesC& aToCompareText, TBool aCase, TInt aValue = 0)
|
sl@0
|
282 |
{
|
sl@0
|
283 |
TUint timeStart;
|
sl@0
|
284 |
TUint timeEnd;
|
sl@0
|
285 |
TInt res = 0;
|
sl@0
|
286 |
TInt i;
|
sl@0
|
287 |
|
sl@0
|
288 |
// CompareF() case...
|
sl@0
|
289 |
timeStart = User::TickCount();
|
sl@0
|
290 |
|
sl@0
|
291 |
for(i=0; i<aNumberOfTimes; ++i)
|
sl@0
|
292 |
{
|
sl@0
|
293 |
res = aOriginalText.CompareF(aToCompareText);
|
sl@0
|
294 |
|
sl@0
|
295 |
if(aCase)
|
sl@0
|
296 |
TheTest(res == 0);
|
sl@0
|
297 |
else
|
sl@0
|
298 |
TheTest(res != 0);
|
sl@0
|
299 |
}
|
sl@0
|
300 |
|
sl@0
|
301 |
timeEnd = User::TickCount();
|
sl@0
|
302 |
|
sl@0
|
303 |
TheTest.Printf(_L("Time to run (x%d) 16-bit CompareF() = %d ticks\n"), aNumberOfTimes, timeEnd - timeStart);
|
sl@0
|
304 |
|
sl@0
|
305 |
// Check return value
|
sl@0
|
306 |
|
sl@0
|
307 |
TheTest(res == aValue);
|
sl@0
|
308 |
|
sl@0
|
309 |
// Compare() case...
|
sl@0
|
310 |
timeStart = User::TickCount();
|
sl@0
|
311 |
|
sl@0
|
312 |
for(i=0; i<aNumberOfTimes; ++i)
|
sl@0
|
313 |
{
|
sl@0
|
314 |
res = aOriginalText.Compare(aToCompareText);
|
sl@0
|
315 |
|
sl@0
|
316 |
if(aCase)
|
sl@0
|
317 |
TheTest(res == 0);
|
sl@0
|
318 |
else
|
sl@0
|
319 |
TheTest(res != 0);
|
sl@0
|
320 |
}
|
sl@0
|
321 |
|
sl@0
|
322 |
timeEnd = User::TickCount();
|
sl@0
|
323 |
|
sl@0
|
324 |
TheTest.Printf(_L("Time to run (x%d) 16-bit Compare() = %d ticks\n"), aNumberOfTimes, timeEnd - timeStart);
|
sl@0
|
325 |
}
|
sl@0
|
326 |
|
sl@0
|
327 |
static void RunComparison_PerformanceTest(TInt aNumberOfTimes, TDesC8& aOriginalText, TDesC8& aToCompareText, TBool aCase, TInt aValue = 0)
|
sl@0
|
328 |
{
|
sl@0
|
329 |
TUint timeStart;
|
sl@0
|
330 |
TUint timeEnd;
|
sl@0
|
331 |
TInt res = 0;
|
sl@0
|
332 |
TInt i;
|
sl@0
|
333 |
|
sl@0
|
334 |
// CompareF() case...
|
sl@0
|
335 |
timeStart = User::TickCount();
|
sl@0
|
336 |
|
sl@0
|
337 |
for(i=0; i<aNumberOfTimes; ++i)
|
sl@0
|
338 |
{
|
sl@0
|
339 |
res = aOriginalText.CompareF(aToCompareText);
|
sl@0
|
340 |
|
sl@0
|
341 |
if(aCase)
|
sl@0
|
342 |
TheTest(res == 0);
|
sl@0
|
343 |
else
|
sl@0
|
344 |
TheTest(res != 0);
|
sl@0
|
345 |
}
|
sl@0
|
346 |
|
sl@0
|
347 |
timeEnd = User::TickCount();
|
sl@0
|
348 |
|
sl@0
|
349 |
TheTest.Printf(_L("Time to run (x%d) 8-bit CompareF() = %d ticks\n"), aNumberOfTimes, timeEnd - timeStart);
|
sl@0
|
350 |
|
sl@0
|
351 |
// Check return value
|
sl@0
|
352 |
|
sl@0
|
353 |
TheTest(res == aValue);
|
sl@0
|
354 |
|
sl@0
|
355 |
// Compare() case...
|
sl@0
|
356 |
timeStart = User::TickCount();
|
sl@0
|
357 |
|
sl@0
|
358 |
for(i=0; i<aNumberOfTimes; ++i)
|
sl@0
|
359 |
{
|
sl@0
|
360 |
res = aOriginalText.Compare(aToCompareText);
|
sl@0
|
361 |
|
sl@0
|
362 |
if(aCase)
|
sl@0
|
363 |
TheTest(res == 0);
|
sl@0
|
364 |
else
|
sl@0
|
365 |
TheTest(res != 0);
|
sl@0
|
366 |
}
|
sl@0
|
367 |
|
sl@0
|
368 |
timeEnd = User::TickCount();
|
sl@0
|
369 |
|
sl@0
|
370 |
TheTest.Printf(_L("Time to run (x%d) 8-bit Compare() = %d ticks\n"), aNumberOfTimes, timeEnd - timeStart);
|
sl@0
|
371 |
}
|
sl@0
|
372 |
|
sl@0
|
373 |
static void CompareVsCompareF_PerformanceTest()
|
sl@0
|
374 |
{
|
sl@0
|
375 |
TheTest.Next(_L("Compare verses CompareF test"));
|
sl@0
|
376 |
|
sl@0
|
377 |
// Declare variables...
|
sl@0
|
378 |
|
sl@0
|
379 |
TInt numberOfTimes = 100000;
|
sl@0
|
380 |
|
sl@0
|
381 |
const TText16 smallUnicodeText16[] = {0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5, 0}; // 5 Characters
|
sl@0
|
382 |
|
sl@0
|
383 |
const TText16 largeUnicodeText16[] = {0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
384 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
385 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
386 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
387 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
388 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
389 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
390 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
391 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
392 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5, 0}; // 50 Characters
|
sl@0
|
393 |
|
sl@0
|
394 |
const TText16 smallErrUnicodeTextLast16[] = {0x01D5, 0x0308, 0x0304, 0x095E, 'X', 0}; // 5 Characters
|
sl@0
|
395 |
|
sl@0
|
396 |
const TText16 smallErrUnicodeTextFirst16[] = {'X', 0x0308, 0x0304, 0x095E, 0x01D5, 0}; // 5 Characters
|
sl@0
|
397 |
|
sl@0
|
398 |
const TText16 largeErrUnicodeTextLast16[] = {0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
399 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
400 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
401 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
402 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
403 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
404 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
405 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
406 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
407 |
0x01D5, 0x0308, 0x0304, 0x095E, 'X', 0}; // 50 Characters
|
sl@0
|
408 |
|
sl@0
|
409 |
const TText16 largeErrUnicodeTextFirst16[] = {'X', 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
410 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
411 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
412 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
413 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
414 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
415 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
416 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
417 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5,
|
sl@0
|
418 |
0x01D5, 0x0308, 0x0304, 0x095E, 0x01D5, 0}; // 50 Characters
|
sl@0
|
419 |
|
sl@0
|
420 |
const TText16 smallMixedText16[] = {'A', 'B', 'C', 0x095E, 0x01D5, 0}; // 5 Characters
|
sl@0
|
421 |
|
sl@0
|
422 |
const TText16 largeMixedText16[] = {'A', 'B', 'C', 0x095E, 0x01D5,
|
sl@0
|
423 |
'F', 'G', 'H', 'I', 'J',
|
sl@0
|
424 |
'K', 'L', 'M', 'N', 'O',
|
sl@0
|
425 |
'P', 'Q', 'R', 'S', 'T',
|
sl@0
|
426 |
'U', 'V', 'W', 'X', 'Y',
|
sl@0
|
427 |
'Z', '1', '2', '3', '4',
|
sl@0
|
428 |
'5', '6', '7', '8', '9',
|
sl@0
|
429 |
'a', 'b', 'c', 'd', 'e',
|
sl@0
|
430 |
'f', 'g', 'h', 'i', 'j',
|
sl@0
|
431 |
'k', 'l', 'm', 0x095E, 0x01D5, 0}; // 50 Characters
|
sl@0
|
432 |
|
sl@0
|
433 |
const TText16 smallErrMixedTextLast16[] = {'A', 'B', 'C', 0x095E, 0x0304, 0}; // 5 Characters
|
sl@0
|
434 |
|
sl@0
|
435 |
const TText16 smallErrMixedTextFirst16[] = {0x0304, 'B', 'C', 0x095E, 0x01D5, 0}; // 5 Characters
|
sl@0
|
436 |
|
sl@0
|
437 |
const TText16 largeErrMixedTextLast16[] = {'A', 'B', 'C', 0x095E, 0x01D5,
|
sl@0
|
438 |
'F', 'G', 'H', 'I', 'J',
|
sl@0
|
439 |
'K', 'L', 'M', 'N', 'O',
|
sl@0
|
440 |
'P', 'Q', 'R', 'S', 'T',
|
sl@0
|
441 |
'U', 'V', 'W', 'X', 'Y',
|
sl@0
|
442 |
'Z', '1', '2', '3', '4',
|
sl@0
|
443 |
'5', '6', '7', '8', '9',
|
sl@0
|
444 |
'a', 'b', 'c', 'd', 'e',
|
sl@0
|
445 |
'f', 'g', 'h', 'i', 'j',
|
sl@0
|
446 |
'k', 'l', 'm', 0x095E, 0x0304, 0}; // 50 Characters
|
sl@0
|
447 |
|
sl@0
|
448 |
const TText16 largeErrMixedTextFirst16[] = {0x0304, 'B', 'C', 0x095E, 0x01D5,
|
sl@0
|
449 |
'F', 'G', 'H', 'I', 'J',
|
sl@0
|
450 |
'K', 'L', 'M', 'N', 'O',
|
sl@0
|
451 |
'P', 'Q', 'R', 'S', 'T',
|
sl@0
|
452 |
'U', 'V', 'W', 'X', 'Y',
|
sl@0
|
453 |
'Z', '1', '2', '3', '4',
|
sl@0
|
454 |
'5', '6', '7', '8', '9',
|
sl@0
|
455 |
'a', 'b', 'c', 'd', 'e',
|
sl@0
|
456 |
'f', 'g', 'h', 'i', 'j',
|
sl@0
|
457 |
'k', 'l', 'm', 0x095E, 0x01D5, 0}; // 50 Characters
|
sl@0
|
458 |
|
sl@0
|
459 |
// (16-bit) Ascii Set of variables
|
sl@0
|
460 |
|
sl@0
|
461 |
TBufC16<50> oriAsciiLargeText(_L("ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789abcdefghijklmno"));
|
sl@0
|
462 |
TBufC16<5> oriAsciiSmallText(_L("ABCDE"));
|
sl@0
|
463 |
|
sl@0
|
464 |
TBufC16<50> matchAsciiLargeText(_L("ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789abcdefghijklmno"));
|
sl@0
|
465 |
TBufC16<5> matchAsciiSmallText(_L("ABCDE"));
|
sl@0
|
466 |
|
sl@0
|
467 |
TBufC16<50> nonMatchAsciiLargeTextLast(_L("ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789abcdefghijklmnX"));
|
sl@0
|
468 |
TBufC16<50> nonMatchAsciiLargeTextFirst(_L("XBCDEFGHIJKLMNOPQRSTUVWXYZ123456789abcdefghijklmno"));
|
sl@0
|
469 |
|
sl@0
|
470 |
TBufC16<5> nonMatchAsciiSmallTextLast(_L("ABCDX"));
|
sl@0
|
471 |
TBufC16<5> nonMatchAsciiSmallTextFirst(_L("XBCDE"));
|
sl@0
|
472 |
|
sl@0
|
473 |
// (8-bit) Ascii Set of variables
|
sl@0
|
474 |
|
sl@0
|
475 |
TBufC8<50> oriAsciiLargeText8(_L8("ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789abcdefghijklmno"));
|
sl@0
|
476 |
TBufC8<5> oriAsciiSmallText8(_L8("ABCDE"));
|
sl@0
|
477 |
|
sl@0
|
478 |
TBufC8<50> matchAsciiLargeText8(_L8("ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789abcdefghijklmno"));
|
sl@0
|
479 |
TBufC8<5> matchAsciiSmallText8(_L8("ABCDE"));
|
sl@0
|
480 |
|
sl@0
|
481 |
TBufC8<50> nonMatchAsciiLargeTextLast8(_L8("ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789abcdefghijklmnX"));
|
sl@0
|
482 |
TBufC8<50> nonMatchAsciiLargeTextFirst8(_L8("XBCDEFGHIJKLMNOPQRSTUVWXYZ123456789abcdefghijklmno"));
|
sl@0
|
483 |
|
sl@0
|
484 |
TBufC8<5> nonMatchAsciiSmallTextLast8(_L8("ABCDX"));
|
sl@0
|
485 |
TBufC8<5> nonMatchAsciiSmallTextFirst8(_L8("XBCDE"));
|
sl@0
|
486 |
|
sl@0
|
487 |
// (16-bit) Unicode Set of variables
|
sl@0
|
488 |
|
sl@0
|
489 |
TBufC16<ARRAY_SIZE(largeUnicodeText16) - 1> oriUnicodeLargeText(largeUnicodeText16);
|
sl@0
|
490 |
TBufC16<ARRAY_SIZE(smallUnicodeText16) - 1> oriUnicodeSmallText(smallUnicodeText16);
|
sl@0
|
491 |
|
sl@0
|
492 |
TBufC16<ARRAY_SIZE(largeUnicodeText16) - 1> matchUnicodeLargeText(largeUnicodeText16);
|
sl@0
|
493 |
TBufC16<ARRAY_SIZE(smallUnicodeText16) - 1> matchUnicodeSmallText(smallUnicodeText16);
|
sl@0
|
494 |
|
sl@0
|
495 |
TBufC16<ARRAY_SIZE(largeErrUnicodeTextLast16) - 1> nonMatchUnicodeLargeTextLast(largeErrUnicodeTextLast16);
|
sl@0
|
496 |
TBufC16<ARRAY_SIZE(largeErrUnicodeTextFirst16) - 1> nonMatchUnicodeLargeTextFirst(largeErrUnicodeTextFirst16);
|
sl@0
|
497 |
|
sl@0
|
498 |
TBufC16<ARRAY_SIZE(smallErrUnicodeTextLast16) - 1> nonMatchUnicodeSmallTextLast(smallErrUnicodeTextLast16);
|
sl@0
|
499 |
TBufC16<ARRAY_SIZE(smallErrUnicodeTextFirst16) - 1> nonMatchUnicodeSmallTextFirst(smallErrUnicodeTextFirst16);
|
sl@0
|
500 |
|
sl@0
|
501 |
// (16-bit) Unicode/Ascii Set of variables
|
sl@0
|
502 |
|
sl@0
|
503 |
TBufC16<ARRAY_SIZE(largeMixedText16) - 1> oriMixedLargeText(largeMixedText16);
|
sl@0
|
504 |
TBufC16<ARRAY_SIZE(smallMixedText16) - 1> oriMixedSmallText(smallMixedText16);
|
sl@0
|
505 |
|
sl@0
|
506 |
TBufC16<ARRAY_SIZE(largeMixedText16) - 1> matchMixedLargeText(largeMixedText16);
|
sl@0
|
507 |
TBufC16<ARRAY_SIZE(smallMixedText16) - 1> matchMixedSmallText(smallMixedText16);
|
sl@0
|
508 |
|
sl@0
|
509 |
TBufC16<ARRAY_SIZE(largeErrMixedTextLast16) - 1> nonMatchMixedLargeTextLast(largeErrMixedTextLast16);
|
sl@0
|
510 |
TBufC16<ARRAY_SIZE(largeErrMixedTextFirst16) - 1> nonMatchMixedLargeTextFirst(largeErrMixedTextFirst16);
|
sl@0
|
511 |
|
sl@0
|
512 |
TBufC16<ARRAY_SIZE(smallErrMixedTextLast16) - 1> nonMatchMixedSmallTextLast(smallErrMixedTextLast16);
|
sl@0
|
513 |
TBufC16<ARRAY_SIZE(smallErrMixedTextFirst16) - 1> nonMatchMixedSmallTextFirst(smallErrMixedTextFirst16);
|
sl@0
|
514 |
|
sl@0
|
515 |
// Run performance tests...
|
sl@0
|
516 |
|
sl@0
|
517 |
TheTest.Printf(_L("\n====== (8-bit) Ascii Performance tests ======"));
|
sl@0
|
518 |
|
sl@0
|
519 |
// Matching (8-bit) Ascii
|
sl@0
|
520 |
|
sl@0
|
521 |
TheTest.Printf(_L("\nComparing Performance Times For: \nMatching Large Ascii Text\n"));
|
sl@0
|
522 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiLargeText8, matchAsciiLargeText8, ETrue);
|
sl@0
|
523 |
|
sl@0
|
524 |
TheTest.Printf(_L("\nComparing Performance Times For: \nMatching Small Ascii Text\n"));
|
sl@0
|
525 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiSmallText8, matchAsciiSmallText8, ETrue);
|
sl@0
|
526 |
|
sl@0
|
527 |
// Non Matching (8-bit) Ascii
|
sl@0
|
528 |
|
sl@0
|
529 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Large Ascii Text / Last Char Diff / Large Vs Large\n"));
|
sl@0
|
530 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiLargeText8, nonMatchAsciiLargeTextLast8, EFalse, -9);
|
sl@0
|
531 |
|
sl@0
|
532 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Large Ascii Text / First Char Diff / Large Vs Large\n"));
|
sl@0
|
533 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiLargeText8, nonMatchAsciiLargeTextFirst8, EFalse, -23);
|
sl@0
|
534 |
|
sl@0
|
535 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Small Ascii Text / Last Char Diff / Small Vs Small\n"));
|
sl@0
|
536 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiSmallText8, nonMatchAsciiSmallTextLast8, EFalse, -19);
|
sl@0
|
537 |
|
sl@0
|
538 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Small Ascii Text / First Char Diff / Small Vs Small\n"));
|
sl@0
|
539 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiSmallText8, nonMatchAsciiSmallTextFirst8, EFalse, -23);
|
sl@0
|
540 |
|
sl@0
|
541 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Large Ascii Text / Last Char Diff / Large Vs Small\n"));
|
sl@0
|
542 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiLargeText8, nonMatchAsciiSmallTextLast8, EFalse, -19);
|
sl@0
|
543 |
|
sl@0
|
544 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Large Ascii Text / First Char Diff / Large Vs Small\n"));
|
sl@0
|
545 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiLargeText8, nonMatchAsciiSmallTextFirst8, EFalse, -23);
|
sl@0
|
546 |
|
sl@0
|
547 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Small Ascii Text / Last Char Diff / Small Vs Large\n"));
|
sl@0
|
548 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiSmallText8, nonMatchAsciiLargeTextLast8, EFalse, -45);
|
sl@0
|
549 |
|
sl@0
|
550 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Small Ascii Text / First Char Diff / Small Vs Large\n"));
|
sl@0
|
551 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiSmallText8, nonMatchAsciiLargeTextFirst8, EFalse, -23);
|
sl@0
|
552 |
|
sl@0
|
553 |
// Mismatching length (8-bit) Ascii
|
sl@0
|
554 |
|
sl@0
|
555 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Small Ascii Text / Length Mismatch / Small Vs Large\n"));
|
sl@0
|
556 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiSmallText8, oriAsciiLargeText8, EFalse, -45);
|
sl@0
|
557 |
|
sl@0
|
558 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Large Ascii Text / Length Mismatch / Large Vs Small\n"));
|
sl@0
|
559 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiLargeText8, oriAsciiSmallText8, EFalse, 45);
|
sl@0
|
560 |
|
sl@0
|
561 |
TheTest.Printf(_L("\n====== (16-bit) Ascii Performance tests ======"));
|
sl@0
|
562 |
|
sl@0
|
563 |
// Matching (16-bit) Ascii
|
sl@0
|
564 |
|
sl@0
|
565 |
TheTest.Printf(_L("\nComparing Performance Times For: \nMatching Large Ascii Text\n"));
|
sl@0
|
566 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiLargeText, matchAsciiLargeText, ETrue);
|
sl@0
|
567 |
|
sl@0
|
568 |
TheTest.Printf(_L("\nComparing Performance Times For: \nMatching Small Ascii Text\n"));
|
sl@0
|
569 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiSmallText, matchAsciiSmallText, ETrue);
|
sl@0
|
570 |
|
sl@0
|
571 |
// Non Matching (16-bit) Ascii
|
sl@0
|
572 |
|
sl@0
|
573 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Large Ascii Text / Last Char Diff / Large Vs Large\n"));
|
sl@0
|
574 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiLargeText, nonMatchAsciiLargeTextLast, EFalse, -9);
|
sl@0
|
575 |
|
sl@0
|
576 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Large Ascii Text / First Char Diff / Large Vs Large\n"));
|
sl@0
|
577 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiLargeText, nonMatchAsciiLargeTextFirst, EFalse, -23);
|
sl@0
|
578 |
|
sl@0
|
579 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Small Ascii Text / Last Char Diff / Small Vs Small\n"));
|
sl@0
|
580 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiSmallText, nonMatchAsciiSmallTextLast, EFalse, -19);
|
sl@0
|
581 |
|
sl@0
|
582 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Small Ascii Text / First Char Diff / Small Vs Small\n"));
|
sl@0
|
583 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiSmallText, nonMatchAsciiSmallTextFirst, EFalse, -23);
|
sl@0
|
584 |
|
sl@0
|
585 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Large Ascii Text / Last Char Diff / Large Vs Small\n"));
|
sl@0
|
586 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiLargeText, nonMatchAsciiSmallTextLast, EFalse, -19);
|
sl@0
|
587 |
|
sl@0
|
588 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Large Ascii Text / First Char Diff / Large Vs Small\n"));
|
sl@0
|
589 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiLargeText, nonMatchAsciiSmallTextFirst, EFalse, -23);
|
sl@0
|
590 |
|
sl@0
|
591 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Small Ascii Text / Last Char Diff / Small Vs Large\n"));
|
sl@0
|
592 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiSmallText, nonMatchAsciiLargeTextLast, EFalse, -1);
|
sl@0
|
593 |
|
sl@0
|
594 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Small Ascii Text / First Char Diff / Small Vs Large\n"));
|
sl@0
|
595 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiSmallText, nonMatchAsciiLargeTextFirst, EFalse, -23);
|
sl@0
|
596 |
|
sl@0
|
597 |
// Mismatching length (16-bit) Ascii
|
sl@0
|
598 |
|
sl@0
|
599 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Small Ascii Text / Length Mismatch / Small Vs Large\n"));
|
sl@0
|
600 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiSmallText, oriAsciiLargeText, EFalse, -1);
|
sl@0
|
601 |
|
sl@0
|
602 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Large Ascii Text / Length Mismatch / Large Vs Small\n"));
|
sl@0
|
603 |
RunComparison_PerformanceTest(numberOfTimes, oriAsciiLargeText, oriAsciiSmallText, EFalse, 1);
|
sl@0
|
604 |
|
sl@0
|
605 |
TheTest.Printf(_L("\n====== (16-bit) Unicode Performance tests ======"));
|
sl@0
|
606 |
|
sl@0
|
607 |
// Matching (16-bit) Unicode
|
sl@0
|
608 |
|
sl@0
|
609 |
TheTest.Printf(_L("\nComparing Performance Times For: \nMatching Large Unicode Text\n"));
|
sl@0
|
610 |
RunComparison_PerformanceTest(numberOfTimes, oriUnicodeLargeText, matchUnicodeLargeText, ETrue);
|
sl@0
|
611 |
|
sl@0
|
612 |
TheTest.Printf(_L("\nComparing Performance Times For: \nMatching Small Unicode Text\n"));
|
sl@0
|
613 |
RunComparison_PerformanceTest(numberOfTimes, oriUnicodeSmallText, matchUnicodeSmallText, ETrue);
|
sl@0
|
614 |
|
sl@0
|
615 |
// Non Matching (16-bit) Unicode
|
sl@0
|
616 |
|
sl@0
|
617 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Large Unicode Text / Last Char Diff / Large Vs Large\n"));
|
sl@0
|
618 |
RunComparison_PerformanceTest(numberOfTimes, oriUnicodeLargeText, nonMatchUnicodeLargeTextLast, EFalse, -3);
|
sl@0
|
619 |
|
sl@0
|
620 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Large Unicode Text / First Char Diff / Large Vs Large\n"));
|
sl@0
|
621 |
RunComparison_PerformanceTest(numberOfTimes, oriUnicodeLargeText, nonMatchUnicodeLargeTextFirst, EFalse, -3);
|
sl@0
|
622 |
|
sl@0
|
623 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Small Unicode Text / Last Char Diff / Small Vs Small\n"));
|
sl@0
|
624 |
RunComparison_PerformanceTest(numberOfTimes, oriUnicodeSmallText, nonMatchUnicodeSmallTextLast, EFalse, -3);
|
sl@0
|
625 |
|
sl@0
|
626 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Small Unicode Text / First Char Diff / Small Vs Small\n"));
|
sl@0
|
627 |
RunComparison_PerformanceTest(numberOfTimes, oriUnicodeSmallText, nonMatchUnicodeSmallTextFirst, EFalse, -3);
|
sl@0
|
628 |
|
sl@0
|
629 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Large Unicode Text / Last Char Diff / Large Vs Small\n"));
|
sl@0
|
630 |
RunComparison_PerformanceTest(numberOfTimes, oriUnicodeLargeText, nonMatchUnicodeSmallTextLast, EFalse, -3);
|
sl@0
|
631 |
|
sl@0
|
632 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Large Unicode Text / First Char Diff / Large Vs Small\n"));
|
sl@0
|
633 |
RunComparison_PerformanceTest(numberOfTimes, oriUnicodeLargeText, nonMatchUnicodeSmallTextFirst, EFalse, -3);
|
sl@0
|
634 |
|
sl@0
|
635 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Small Unicode Text / Last Char Diff / Small Vs Large\n"));
|
sl@0
|
636 |
RunComparison_PerformanceTest(numberOfTimes, oriUnicodeSmallText, nonMatchUnicodeLargeTextLast, EFalse, -1);
|
sl@0
|
637 |
|
sl@0
|
638 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Small Unicode Text / First Char Diff / Small Vs Large\n"));
|
sl@0
|
639 |
RunComparison_PerformanceTest(numberOfTimes, oriUnicodeSmallText, nonMatchUnicodeLargeTextFirst, EFalse, -3);
|
sl@0
|
640 |
|
sl@0
|
641 |
// Mismatching length (16-bit) Unicode
|
sl@0
|
642 |
|
sl@0
|
643 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Small Unicode Text / Length Mismatch / Small Vs Large\n"));
|
sl@0
|
644 |
RunComparison_PerformanceTest(numberOfTimes, oriUnicodeSmallText, oriUnicodeLargeText, EFalse, -1);
|
sl@0
|
645 |
|
sl@0
|
646 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Large Unicode Text / Length Mismatch / Large Vs Small\n"));
|
sl@0
|
647 |
RunComparison_PerformanceTest(numberOfTimes, oriUnicodeLargeText, oriUnicodeSmallText, EFalse, 1);
|
sl@0
|
648 |
|
sl@0
|
649 |
TheTest.Printf(_L("\n====== (16-bit) Mixed Performance tests ======"));
|
sl@0
|
650 |
|
sl@0
|
651 |
// Matching (16-bit) Mixed
|
sl@0
|
652 |
|
sl@0
|
653 |
TheTest.Printf(_L("\nComparing Performance Times For: \nMatching Large Mixed Text\n"));
|
sl@0
|
654 |
RunComparison_PerformanceTest(numberOfTimes, oriMixedLargeText, matchMixedLargeText, ETrue);
|
sl@0
|
655 |
|
sl@0
|
656 |
TheTest.Printf(_L("\nComparing Performance Times For: \nMatching Small Mixed Text\n"));
|
sl@0
|
657 |
RunComparison_PerformanceTest(numberOfTimes, oriMixedSmallText, matchMixedSmallText, ETrue);
|
sl@0
|
658 |
|
sl@0
|
659 |
// Non Matching (16-bit) Mixed
|
sl@0
|
660 |
|
sl@0
|
661 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Large Mixed Text / Last Char Diff / Large Vs Large\n"));
|
sl@0
|
662 |
RunComparison_PerformanceTest(numberOfTimes, oriMixedLargeText, nonMatchMixedLargeTextLast, EFalse, -655);
|
sl@0
|
663 |
|
sl@0
|
664 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Large Mixed Text / First Char Diff / Large Vs Large\n"));
|
sl@0
|
665 |
RunComparison_PerformanceTest(numberOfTimes, oriMixedLargeText, nonMatchMixedLargeTextFirst, EFalse, -675);
|
sl@0
|
666 |
|
sl@0
|
667 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Small Mixed Text / Last Char Diff / Small Vs Small\n"));
|
sl@0
|
668 |
RunComparison_PerformanceTest(numberOfTimes, oriMixedSmallText, nonMatchMixedSmallTextLast, EFalse, -655);
|
sl@0
|
669 |
|
sl@0
|
670 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Small Mixed Text / First Char Diff / Small Vs Small\n"));
|
sl@0
|
671 |
RunComparison_PerformanceTest(numberOfTimes, oriMixedSmallText, nonMatchMixedSmallTextFirst, EFalse, -675);
|
sl@0
|
672 |
|
sl@0
|
673 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Large Mixed Text / Last Char Diff / Large Vs Small\n"));
|
sl@0
|
674 |
RunComparison_PerformanceTest(numberOfTimes, oriMixedLargeText, nonMatchMixedSmallTextLast, EFalse, -655);
|
sl@0
|
675 |
|
sl@0
|
676 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Large Mixed Text / First Char Diff / Large Vs Small\n"));
|
sl@0
|
677 |
RunComparison_PerformanceTest(numberOfTimes, oriMixedLargeText, nonMatchMixedSmallTextFirst, EFalse, -675);
|
sl@0
|
678 |
|
sl@0
|
679 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Small Mixed Text / Last Char Diff / Small Vs Large\n"));
|
sl@0
|
680 |
RunComparison_PerformanceTest(numberOfTimes, oriMixedSmallText, nonMatchMixedLargeTextLast, EFalse, -1);
|
sl@0
|
681 |
|
sl@0
|
682 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Small Mixed Text / First Char Diff / Small Vs Large\n"));
|
sl@0
|
683 |
RunComparison_PerformanceTest(numberOfTimes, oriMixedSmallText, nonMatchMixedLargeTextFirst, EFalse, -675);
|
sl@0
|
684 |
|
sl@0
|
685 |
// Mismatching length (16-bit) Mixed
|
sl@0
|
686 |
|
sl@0
|
687 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Small Mixed Text / Length Mismatch / Small Vs Large\n"));
|
sl@0
|
688 |
RunComparison_PerformanceTest(numberOfTimes, oriMixedSmallText, oriMixedLargeText, EFalse, -1);
|
sl@0
|
689 |
|
sl@0
|
690 |
TheTest.Printf(_L("\nComparing Performance Times For: \nNON Matching Large Mixed Text / Length Mismatch / Large Vs Small\n"));
|
sl@0
|
691 |
RunComparison_PerformanceTest(numberOfTimes, oriMixedLargeText, oriMixedSmallText, EFalse, 1);
|
sl@0
|
692 |
}
|
sl@0
|
693 |
|
sl@0
|
694 |
|
sl@0
|
695 |
|
sl@0
|
696 |
TInt E32Main()
|
sl@0
|
697 |
{
|
sl@0
|
698 |
TheTest.Title();
|
sl@0
|
699 |
|
sl@0
|
700 |
TheTest.Start(_L("Folding - performance tests"));
|
sl@0
|
701 |
|
sl@0
|
702 |
::FindF_PerformanceTest();
|
sl@0
|
703 |
::MatchF_PerformanceTest();
|
sl@0
|
704 |
::CompareF_PerformanceTest();
|
sl@0
|
705 |
::PlainTextPerformanceTest();
|
sl@0
|
706 |
::CompareVsCompareF_PerformanceTest();
|
sl@0
|
707 |
|
sl@0
|
708 |
TheTest.End();
|
sl@0
|
709 |
TheTest.Close();
|
sl@0
|
710 |
|
sl@0
|
711 |
return KErrNone;
|
sl@0
|
712 |
}
|