| OLD | NEW |
| 1 /* | 1 /* |
| 2 ********************************************************************** | 2 ********************************************************************** |
| 3 * Copyright (C) 2002-2008, International Business Machines | 3 * Copyright (C) 2002-2014, International Business Machines |
| 4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
| 5 ********************************************************************** | 5 ********************************************************************** |
| 6 * file name: utrie2perf.cpp | 6 * file name: utrie2perf.cpp |
| 7 * encoding: US-ASCII | 7 * encoding: US-ASCII |
| 8 * tab size: 8 (not used) | 8 * tab size: 8 (not used) |
| 9 * indentation:4 | 9 * indentation:4 |
| 10 * | 10 * |
| 11 * created on: 2008sep07 | 11 * created on: 2008sep07 |
| 12 * created by: Markus W. Scherer | 12 * created by: Markus W. Scherer |
| 13 * | 13 * |
| 14 * Performance test program for UTrie2. | 14 * Performance test program for UTrie2. |
| 15 */ | 15 */ |
| 16 | 16 |
| 17 #include <stdio.h> | 17 #include <stdio.h> |
| 18 #include <stdlib.h> | 18 #include <stdlib.h> |
| 19 #include "unicode/uchar.h" | 19 #include "unicode/uchar.h" |
| 20 #include "unicode/unorm.h" | 20 #include "unicode/unorm.h" |
| 21 #include "unicode/uperf.h" | 21 #include "unicode/uperf.h" |
| 22 #include "uoptions.h" | 22 #include "uoptions.h" |
| 23 | 23 |
| 24 #define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0])) | |
| 25 | |
| 26 #if 0 | 24 #if 0 |
| 27 // Left over from when icu/branches/markus/utf8 could use both old UTrie | 25 // Left over from when icu/branches/markus/utf8 could use both old UTrie |
| 28 // and new UTrie2, switched with #if in unorm.cpp and ubidi_props.c. | 26 // and new UTrie2, switched with #if in unorm.cpp and ubidi_props.c. |
| 29 // Comparative benchmarks were done in that branch on revision r24630 | 27 // Comparative benchmarks were done in that branch on revision r24630 |
| 30 // and earlier. | 28 // and earlier. |
| 31 U_CAPI void U_EXPORT2 | 29 U_CAPI void U_EXPORT2 |
| 32 unorm_initUTrie2(UErrorCode *pErrorCode); | 30 unorm_initUTrie2(UErrorCode *pErrorCode); |
| 33 | 31 |
| 34 U_CAPI void U_EXPORT2 | 32 U_CAPI void U_EXPORT2 |
| 35 ubidi_initUTrie2(UErrorCode *pErrorCode); | 33 ubidi_initUTrie2(UErrorCode *pErrorCode); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 } | 250 } |
| 253 | 251 |
| 254 if (test.run() == FALSE){ | 252 if (test.run() == FALSE){ |
| 255 fprintf(stderr, "FAILED: Tests could not be run please check the " | 253 fprintf(stderr, "FAILED: Tests could not be run please check the " |
| 256 "arguments.\n"); | 254 "arguments.\n"); |
| 257 return -1; | 255 return -1; |
| 258 } | 256 } |
| 259 | 257 |
| 260 return 0; | 258 return 0; |
| 261 } | 259 } |
| OLD | NEW |