diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-03-20 01:12:28 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-03-20 01:12:28 +0000 |
commit | 666f95b95a2f6347f7b7bbc8951144df2db05479 (patch) | |
tree | 6ea986aac1eb964fda56cdb50886230054002bd0 /pod/perlunicode.pod | |
parent | b310b0538cc1a7948587a9e5ff30683fec2a3ece (diff) | |
download | perl-666f95b95a2f6347f7b7bbc8951144df2db05479.tar.gz |
Whitespace tweaks.
p4raw-id: //depot/perl@15351
Diffstat (limited to 'pod/perlunicode.pod')
-rw-r--r-- | pod/perlunicode.pod | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pod/perlunicode.pod b/pod/perlunicode.pod index 34e00c8076..468f24ceaf 100644 --- a/pod/perlunicode.pod +++ b/pod/perlunicode.pod @@ -975,7 +975,7 @@ on byte encoded strings. All functions that need to hop over characters such as length(), substr() or index() can work B<much> faster when the underlying data are byte-encoded. Witness the following benchmark: - + % perl -e ' use Benchmark; use strict; @@ -994,7 +994,7 @@ following benchmark: LENGTH_U: 2 wallclock secs ( 2.11 usr + 0.00 sys = 2.11 CPU) @ 12155.45/s (n=25648) SUBSTR_B: 3 wallclock secs ( 2.16 usr + 0.00 sys = 2.16 CPU) @ 374480.09/s (n=808877) SUBSTR_U: 2 wallclock secs ( 2.11 usr + 0.00 sys = 2.11 CPU) @ 6791.00/s (n=14329) - + The numbers show an incredible slowness on long UTF-8 strings and you should carefully avoid to use these functions within tight loops. For example if you want to iterate over characters, it is infinitely @@ -1022,7 +1022,7 @@ benchmark shows: You see, the algorithm based on substr() was faster with byte encoded data but it is pathologically slow with UTF-8 data. - + =head1 SEE ALSO L<perluniintro>, L<encoding>, L<Encode>, L<open>, L<utf8>, L<bytes>, |