develooper Front page | perl.perl5.porters | Postings from April 2021

Re: Perl 7: Fix string leaks?

Thread Previous | Thread Next
From:
Dan Book
Date:
April 2, 2021 02:21
Subject:
Re: Perl 7: Fix string leaks?
Message ID:
CABMkAVWzZvRGZr=mDnGVx9O+AsZU=DAfLcqWs92K-vFhe8fBdw@mail.gmail.com
On Thu, Apr 1, 2021 at 9:58 PM Yuki Kimoto <kimoto.yuki@gmail.com> wrote:

> Dan
>
> I've been thinking the following, but am I wrong?
>
> Downgraded format : latin-1
> Upgraded format : UTF-8
>
> And I have a question
>
> What means that the Downgraded format is more efficient?
>
> Count char count? latin-1 ia fast because byte count is the same as text
> count. UTF-8 is slow for sequential access.
>

This is one part but the result is cached after the first access. More
importantly, operations like regex matching and substr are faster when each
character is a single byte internally.

-Dan

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