2001-05-11 20:04:22 +00:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
|
|
<HTML>
|
|
|
|
|
|
|
|
<HEAD>
|
|
|
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">
|
2001-06-06 23:28:06 +00:00
|
|
|
<META NAME="GENERATOR" Content="Visual Page 2.0 for Windows">
|
|
|
|
<TITLE>collperf</TITLE>
|
2001-05-11 20:04:22 +00:00
|
|
|
</HEAD>
|
|
|
|
|
2001-06-06 23:28:06 +00:00
|
|
|
<BODY BGCOLOR="white">
|
2001-05-11 20:04:22 +00:00
|
|
|
|
|
|
|
<H2>collperf</H2>
|
|
|
|
<P>collperf is a test program for comparing collation performance and key lengths of ICU, Windows native collation
|
2001-06-06 23:28:06 +00:00
|
|
|
and Unix/POSIX collation. It operates on a file of lines (names, for example), and performs one of three tests:</P>
|
2001-05-11 20:04:22 +00:00
|
|
|
|
|
|
|
<OL>
|
2001-06-06 23:28:06 +00:00
|
|
|
<LI>Sort Key generation. Report on key lengths and key generation times.
|
|
|
|
<LI>Binary search. Report the average time required to look up each of the names (file lines) from the file in
|
2001-05-11 20:04:22 +00:00
|
|
|
a sorted list of all of the names.
|
2001-06-06 23:28:06 +00:00
|
|
|
<LI>Quick Sort. Report the time required to sort the file in memory, using the C library qsort function. The file
|
|
|
|
order is randomized prior to the sort.
|
2001-05-11 20:04:22 +00:00
|
|
|
</OL>
|
|
|
|
|
2001-06-06 23:28:06 +00:00
|
|
|
<P>
|
2001-05-11 20:04:22 +00:00
|
|
|
<P><B>Usage Summary</B></P>
|
|
|
|
|
|
|
|
<BLOCKQUOTE>
|
|
|
|
<P>
|
|
|
|
<TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFFBF0">
|
2001-06-06 23:28:06 +00:00
|
|
|
<TR>
|
|
|
|
<TD WIDTH="100%">
|
|
|
|
<P><TT>collperf -help</TT>
|
|
|
|
<BLOCKQUOTE>
|
|
|
|
<PRE><TT>Usage: strperf options...
|
|
|
|
-help Display this message.
|
|
|
|
-file file_name utf-16 format file of names
|
|
|
|
-locale name ICU locale to use. Default is en_US
|
|
|
|
-langid 0x1234 Windows Language ID number. Default 0x409 (en_US)
|
|
|
|
see http://msdn.microsoft.com/library/psdk/winbase/nls_8xo3.htm
|
|
|
|
-win Run test using Windows native services. (ICU is default)
|
|
|
|
-unix Run test using Unix strxfrm, strcoll services.
|
|
|
|
-uselen Use API with string lengths. Default is null-terminated strings
|
|
|
|
-usekeys Run tests using sortkeys rather than strcoll
|
|
|
|
-loop nnnn Loopcount for test. Adjust for reasonable total running time.
|
|
|
|
-terse Terse numbers-only output. Intended for use by scripts.
|
|
|
|
-french French accent ordering
|
|
|
|
-norm Normalizing mode on
|
|
|
|
-shifted Shifted mode
|
|
|
|
-lower Lower case first
|
|
|
|
-upper Upper case first
|
|
|
|
-case Enable separate case level
|
|
|
|
-level n Sort level, 1 to 5, for Primary, Secndary, Tertiary, Quaternary, Identical
|
|
|
|
-binsearch Binary Search timing test
|
|
|
|
-keygen Sort Key Generation timing test
|
|
|
|
-qsort Quicksort timing test</TT></PRE>
|
|
|
|
</BLOCKQUOTE>
|
|
|
|
</TD>
|
|
|
|
</TR>
|
2001-05-11 20:04:22 +00:00
|
|
|
</TABLE>
|
|
|
|
</P>
|
|
|
|
</BLOCKQUOTE>
|
|
|
|
|
|
|
|
<P><B>Example</B></P>
|
|
|
|
|
|
|
|
<BLOCKQUOTE>
|
|
|
|
<P>
|
|
|
|
<TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFFBF0">
|
2001-06-06 23:28:06 +00:00
|
|
|
<TR>
|
|
|
|
<TD WIDTH="100%"><TT>C:\>collperf -loop 200 -file latin.txt -keygen -shifted -level 4<BR>
|
|
|
|
file "latin.txt", 7604 lines.<BR>
|
|
|
|
Sort Key Generation: total # of keys = 197704<BR>
|
|
|
|
Sort Key Generation: time per key = 4253 ns<BR>
|
|
|
|
Key Length / character = 1.730054</TT></TD>
|
|
|
|
</TR>
|
2001-05-11 20:04:22 +00:00
|
|
|
</TABLE>
|
|
|
|
|
|
|
|
</BLOCKQUOTE>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
</BODY>
|
|
|
|
|
|
|
|
</HTML>
|