185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> 285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho<HTML> 385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho<HEAD> 585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho <META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1"> 685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho <meta name="Copyright" content="Copyright (c) 2002-2008, International Business Machines Corporation and others. All Rights Reserved."> 785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho <META NAME="GENERATOR" Content="Visual Page 2.0 for Windows"> 885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho <TITLE>collperf</TITLE> 985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho</HEAD> 1085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 1185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho<BODY BGCOLOR="white"> 1285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 1385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho<H2>collperf</H2> 1485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho<P>collperf is a test program for comparing collation performance and key lengths of ICU, Windows native collation 1585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Hoand Unix/POSIX collation. It operates on a file of lines (names, for example), and performs one of three tests:</P> 1685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 1785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho<OL> 1885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho <LI>Sort Key generation. Report on key lengths and key generation times. 1985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho <LI>Binary search. Report the average time required to look up each of the names (file lines) from the file in 2085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho a sorted list of all of the names. 2185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho <LI>Quick Sort. Report the time required to sort the file in memory, using the C library qsort function. The file 2285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho order is randomized prior to the sort. 2385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho</OL> 2485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 2585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho<P> 2685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho<P><B>Usage Summary</B></P> 2785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 2885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho<BLOCKQUOTE> 2985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho <P> 3085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho <TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFFBF0"> 3185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho <TR> 3285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho <TD WIDTH="100%"> 3385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho <P><TT>collperf -help</TT> 3485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho <BLOCKQUOTE> 3585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho <PRE><TT>Usage: strperf options... 3685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho-help Display this message. 3785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho-file file_name utf-16 format file of names 3885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho-locale name ICU locale to use. Default is en_US 3985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho-langid 0x1234 Windows Language ID number. Default 0x409 (en_US) 4085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho see http://msdn.microsoft.com/library/psdk/winbase/nls_8xo3.htm 4185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho-win Run test using Windows native services. (ICU is default) 4285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho-unix Run test using Unix strxfrm, strcoll services. 4385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho-uselen Use API with string lengths. Default is null-terminated strings 4485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho-usekeys Run tests using sortkeys rather than strcoll 4585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho-loop nnnn Loopcount for test. Adjust for reasonable total running time. 4685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho-terse Terse numbers-only output. Intended for use by scripts. 4785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho-french French accent ordering 4885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho-norm Normalizing mode on 4985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho-shifted Shifted mode 5085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho-lower Lower case first 5185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho-upper Upper case first 5285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho-case Enable separate case level 5385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho-level n Sort level, 1 to 5, for Primary, Secndary, Tertiary, Quaternary, Identical 5485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho-binsearch Binary Search timing test 5585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho-keygen Sort Key Generation timing test 5685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho-qsort Quicksort timing test</TT></PRE> 5785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho </BLOCKQUOTE> 5885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho </TD> 5985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho </TR> 6085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho </TABLE> 6185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho</P> 6285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho</BLOCKQUOTE> 6385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 6485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho<P><B>Example</B></P> 6585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 6685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho<BLOCKQUOTE> 6785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho <P> 6885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho <TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFFBF0"> 6985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho <TR> 7085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho <TD WIDTH="100%"><TT>C:\>collperf -loop 200 -file latin.txt -keygen -shifted -level 4<BR> 7185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho file "latin.txt", 7604 lines.<BR> 7285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho Sort Key Generation: total # of keys = 197704<BR> 7385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho Sort Key Generation: time per key = 4253 ns<BR> 7485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho Key Length / character = 1.730054</TT></TD> 7585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho </TR> 7685bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho </TABLE> 7785bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 7885bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho</BLOCKQUOTE> 7985bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 8085bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho<P> 8185bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 8285bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho</BODY> 8385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho 8485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho</HTML>