develooper Front page | perl.perl5.porters | Postings from December 2017

Re: Behavior of bitwise ops on unencountered wide characters

Thread Previous | Thread Next
From:
Paul "LeoNerd" Evans
Date:
December 20, 2017 16:42
Subject:
Re: Behavior of bitwise ops on unencountered wide characters
Message ID:
20171220164216.1307e2f8@shy.leonerd.org.uk
On Tue, 19 Dec 2017 19:16:24 -0700
Karl Williamson <public@khwilliamson.com> wrote:

> 3) Is there enough usage of quantified [[:ascii:]] in the wild to 
> justify doing this optimization?  (I was surprised to see only 132
> CPAN modules have plain :ascii: (this grep also would catch negation))

Perhaps they use 

 [\x00-\x7F]

or something similar? I'd imagine looking for one of those would be
much shorter too, as you can AND with 0x80808080 (or 64bit equivalent)
and get 4 (8) chars at once.

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk      |  https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/  |  https://www.tindie.com/stores/leonerd/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About