1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> 2 <HTML> 3 4 <HEAD> 5 <META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1"> 6 <meta name="Copyright" content="Copyright (c) 2002-2008, International Business Machines Corporation and others. All Rights Reserved."> 7 <META NAME="GENERATOR" Content="Visual Page 2.0 for Windows"> 8 <TITLE>collperf</TITLE> 9 </HEAD> 10 11 <BODY BGCOLOR="white"> 12 13 <H2>collperf</H2> 14 <P>collperf is a test program for comparing collation performance and key lengths of ICU, Windows native collation 15 and Unix/POSIX collation. It operates on a file of lines (names, for example), and performs one of three tests:</P> 16 17 <OL> 18 <LI>Sort Key generation. Report on key lengths and key generation times. 19 <LI>Binary search. Report the average time required to look up each of the names (file lines) from the file in 20 a sorted list of all of the names. 21 <LI>Quick Sort. Report the time required to sort the file in memory, using the C library qsort function. The file 22 order is randomized prior to the sort. 23 </OL> 24 25 <P> 26 <P><B>Usage Summary</B></P> 27 28 <BLOCKQUOTE> 29 <P> 30 <TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFFBF0"> 31 <TR> 32 <TD WIDTH="100%"> 33 <P><TT>collperf -help</TT> 34 <BLOCKQUOTE> 35 <PRE><TT>Usage: strperf options... 36 -help Display this message. 37 -file file_name utf-16 format file of names 38 -locale name ICU locale to use. Default is en_US 39 -langid 0x1234 Windows Language ID number. Default 0x409 (en_US) 40 see http://msdn.microsoft.com/library/psdk/winbase/nls_8xo3.htm 41 -win Run test using Windows native services. (ICU is default) 42 -unix Run test using Unix strxfrm, strcoll services. 43 -uselen Use API with string lengths. Default is null-terminated strings 44 -usekeys Run tests using sortkeys rather than strcoll 45 -loop nnnn Loopcount for test. Adjust for reasonable total running time. 46 -terse Terse numbers-only output. Intended for use by scripts. 47 -french French accent ordering 48 -norm Normalizing mode on 49 -shifted Shifted mode 50 -lower Lower case first 51 -upper Upper case first 52 -case Enable separate case level 53 -level n Sort level, 1 to 5, for Primary, Secndary, Tertiary, Quaternary, Identical 54 -binsearch Binary Search timing test 55 -keygen Sort Key Generation timing test 56 -qsort Quicksort timing test</TT></PRE> 57 </BLOCKQUOTE> 58 </TD> 59 </TR> 60 </TABLE> 61 </P> 62 </BLOCKQUOTE> 63 64 <P><B>Example</B></P> 65 66 <BLOCKQUOTE> 67 <P> 68 <TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFFBF0"> 69 <TR> 70 <TD WIDTH="100%"><TT>C:\>collperf -loop 200 -file latin.txt -keygen -shifted -level 4<BR> 71 file "latin.txt", 7604 lines.<BR> 72 Sort Key Generation: total # of keys = 197704<BR> 73 Sort Key Generation: time per key = 4253 ns<BR> 74 Key Length / character = 1.730054</TT></TD> 75 </TR> 76 </TABLE> 77 78 </BLOCKQUOTE> 79 80 <P> 81 82 </BODY> 83 84 </HTML>