Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: performance of length() in utf-8

by Anonymous Monk
on Mar 03, 2016 at 19:46 UTC ( [id://1156758]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while (start_ptr < end_ptr) {
        start_ptr += UTF8SKIP(start_ptr);
        len++;
    }
    
  2. or download this
    PL_utf8_length($chunk)                    # first iteration
    PL_utf8_length($chunk . $chunk)           # second iteration
    PL_utf8_length($chunk . $chunk . $chunk)  # third iteration
    ...and so on...
    
  3. or download this
    PL_utf8_length($chunk)  # 1st
    PL_utf8_length($chunk)  # 2nd
    PL_utf8_length($chunk)  # 3rd
    ...
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1156758]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (9)
As of 2024-04-18 11:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found