12e5b6d6dSopenharmony_ci<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
22e5b6d6dSopenharmony_ci<HTML>
32e5b6d6dSopenharmony_ci
42e5b6d6dSopenharmony_ci<HEAD>
52e5b6d6dSopenharmony_ci	<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">
62e5b6d6dSopenharmony_ci        <meta name="Copyright" content="Copyright (C) 2016 and later: Unicode, Inc. and others.
72e5b6d6dSopenharmony_ci        License & terms of use: http://www.unicode.org/copyright.html
82e5b6d6dSopenharmony_ci        Copyright (c) 2002-2008, International Business Machines Corporation and others. All Rights Reserved.">
92e5b6d6dSopenharmony_ci	<META NAME="GENERATOR" Content="Visual Page 2.0 for Windows">
102e5b6d6dSopenharmony_ci	<TITLE>collperf</TITLE>
112e5b6d6dSopenharmony_ci</HEAD>
122e5b6d6dSopenharmony_ci
132e5b6d6dSopenharmony_ci<BODY BGCOLOR="white">
142e5b6d6dSopenharmony_ci
152e5b6d6dSopenharmony_ci<H2>collperf</H2>
162e5b6d6dSopenharmony_ci<P>collperf is a test program for comparing collation performance and key lengths of ICU, Windows native collation
172e5b6d6dSopenharmony_ciand Unix/POSIX collation. It operates on a file of lines (names, for example), and performs one of three tests:</P>
182e5b6d6dSopenharmony_ci
192e5b6d6dSopenharmony_ci<OL>
202e5b6d6dSopenharmony_ci	<LI>Sort Key generation. Report on key lengths and key generation times.
212e5b6d6dSopenharmony_ci	<LI>Binary search. Report the average time required to look up each of the names (file lines) from the file in
222e5b6d6dSopenharmony_ci	a sorted list of all of the names.
232e5b6d6dSopenharmony_ci	<LI>Quick Sort. Report the time required to sort the file in memory, using the C library qsort function. The file
242e5b6d6dSopenharmony_ci	order is randomized prior to the sort.
252e5b6d6dSopenharmony_ci</OL>
262e5b6d6dSopenharmony_ci
272e5b6d6dSopenharmony_ci<P>
282e5b6d6dSopenharmony_ci<P><B>Usage Summary</B></P>
292e5b6d6dSopenharmony_ci
302e5b6d6dSopenharmony_ci<BLOCKQUOTE>
312e5b6d6dSopenharmony_ci	<P>
322e5b6d6dSopenharmony_ci	<TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFFBF0">
332e5b6d6dSopenharmony_ci		<TR>
342e5b6d6dSopenharmony_ci			<TD WIDTH="100%">
352e5b6d6dSopenharmony_ci				<P><TT>collperf -help</TT>
362e5b6d6dSopenharmony_ci				<BLOCKQUOTE>
372e5b6d6dSopenharmony_ci					<PRE><TT>Usage: strperf options...
382e5b6d6dSopenharmony_ci-help                  Display this message.
392e5b6d6dSopenharmony_ci-file file_name        utf-16 format file of names
402e5b6d6dSopenharmony_ci-locale name           ICU locale to use. Default is en_US
412e5b6d6dSopenharmony_ci-langid 0x1234         Windows Language ID number. Default 0x409 (en_US)
422e5b6d6dSopenharmony_ci                       see http://msdn.microsoft.com/library/psdk/winbase/nls_8xo3.htm
432e5b6d6dSopenharmony_ci-win                   Run test using Windows native services. (ICU is default)
442e5b6d6dSopenharmony_ci-unix                  Run test using Unix strxfrm, strcoll services.
452e5b6d6dSopenharmony_ci-uselen                Use API with string lengths. Default is null-terminated strings
462e5b6d6dSopenharmony_ci-usekeys               Run tests using sortkeys rather than strcoll
472e5b6d6dSopenharmony_ci-loop nnnn             Loopcount for test. Adjust for reasonable total running time.
482e5b6d6dSopenharmony_ci-terse                 Terse numbers-only output. Intended for use by scripts.
492e5b6d6dSopenharmony_ci-french                French accent ordering
502e5b6d6dSopenharmony_ci-norm                  Normalizing mode on
512e5b6d6dSopenharmony_ci-shifted               Shifted mode
522e5b6d6dSopenharmony_ci-lower                 Lower case first
532e5b6d6dSopenharmony_ci-upper                 Upper case first
542e5b6d6dSopenharmony_ci-case                  Enable separate case level
552e5b6d6dSopenharmony_ci-level n               Sort level, 1 to 5, for Primary, Secndary, Tertiary, Quaternary, Identical
562e5b6d6dSopenharmony_ci-binsearch             Binary Search timing test
572e5b6d6dSopenharmony_ci-keygen                Sort Key Generation timing test
582e5b6d6dSopenharmony_ci-qsort                 Quicksort timing test</TT></PRE>
592e5b6d6dSopenharmony_ci				</BLOCKQUOTE>
602e5b6d6dSopenharmony_ci			</TD>
612e5b6d6dSopenharmony_ci		</TR>
622e5b6d6dSopenharmony_ci	</TABLE>
632e5b6d6dSopenharmony_ci</P>
642e5b6d6dSopenharmony_ci</BLOCKQUOTE>
652e5b6d6dSopenharmony_ci
662e5b6d6dSopenharmony_ci<P><B>Example</B></P>
672e5b6d6dSopenharmony_ci
682e5b6d6dSopenharmony_ci<BLOCKQUOTE>
692e5b6d6dSopenharmony_ci	<P>
702e5b6d6dSopenharmony_ci	<TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFFBF0">
712e5b6d6dSopenharmony_ci		<TR>
722e5b6d6dSopenharmony_ci			<TD WIDTH="100%"><TT>C:\&gt;collperf -loop 200 -file latin.txt -keygen -shifted -level 4<BR>
732e5b6d6dSopenharmony_ci				file &quot;latin.txt&quot;, 7604 lines.<BR>
742e5b6d6dSopenharmony_ci				Sort Key Generation: total # of keys = 197704<BR>
752e5b6d6dSopenharmony_ci				Sort Key Generation: time per key = 4253 ns<BR>
762e5b6d6dSopenharmony_ci				Key Length / character = 1.730054</TT></TD>
772e5b6d6dSopenharmony_ci		</TR>
782e5b6d6dSopenharmony_ci	</TABLE>
792e5b6d6dSopenharmony_ci
802e5b6d6dSopenharmony_ci</BLOCKQUOTE>
812e5b6d6dSopenharmony_ci
822e5b6d6dSopenharmony_ci<P>
832e5b6d6dSopenharmony_ci
842e5b6d6dSopenharmony_ci</BODY>
852e5b6d6dSopenharmony_ci
862e5b6d6dSopenharmony_ci</HTML>
87