[prev in list] [next in list] [prev in thread] [next in thread] 

List:       icu
Subject:    Re: Break performance
From:       "Andy Heninger" <andyh () jtcsv ! com>
Date:       2002-09-27 20:14:38
[Download RAW message or body]

> 1) Is it more efficient to iterate using ubrk_next/ubrk_previous, or to 
> use ubrk_preceding/ubrk_following? 

ubrk_next() is the most efficient function, by a substantial margin.
previous(), preceding() and following() are all slower.

> 2 [snip] I want to iterate over the text backwards...
The approach you outlined is fine.
> ubrk_last
> loop{
> ubrk_previous
> }

It will be slower than going forwards with next().


   -- Andy Heninger
      heninger@us.ibm.com



----- Original Message ----- 
From: "Avery Chan" <avery@apple.com>
To: "icu list" <icu@oss.software.ibm.com>
Sent: Friday, September 27, 2002 12:48 PM
Subject: Break performance


> I have a couple questions about text break usage and performance:
> 
> 1) Is it more efficient to iterate using ubrk_next/ubrk_previous, or to 
> use ubrk_preceding/ubrk_following? If one of these is a convenience 
> function I would prefer to use the one that eliminates an additional 
> function call.
> 
> 2) If I am iterating over my text using ubrk_next, but at the end of my 
> iteration I want to iterate over the text backwards. How do I reset the 
> iterator? Is it enough to call:
> 
> ubrk_last
> loop{
> ubrk_previous
> }
> 
> Thanks!
> 
> Avery
> 
 

_______________________________________________
icu mailing list
icu@oss.software.ibm.com
http://oss.software.ibm.com/developerworks/oss/mailman/listinfo/icu
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic