Cost of code point order comparison

From: Mark Davis (mark@macchiato.com)
Date: Tue Jun 26 2001 - 18:17:53 EDT


I asked our performance czar to run a test comparing the performance of the two ICU utf-16 strcmp routines (UTF-16 binary order and UTF-8/32 binary order). While I want to caution that the results are preliminary, here they are:

"Test File u_strcmp u_strcmpCodePointOrder
---------------------------------------------------
Asian Names 81 ns 83 ns / call
Latin Names 127 ns 124 ns

The test is a binary search of a sorted list of roughly 10000 names. The Asian names are quite a bit shorter, which probably accounts for the time difference between them and the Latin names.

The code path through the u_strcmpCodePointOrder function has (statistically, anyhow) exactly one added simple if relative to u_strcmp. The timing differences are repeatable on my machine, but are probably mostly noise from code alignment and the like..."



This archive was generated by hypermail 2.1.2 : Fri Jul 06 2001 - 00:17:19 EDT