develooper Front page | perl.perl5.porters | Postings from February 2006

[perl #38595] slow with unicode regexps

Thread Next
From:
ags @ mimuw . edu . pl
Date:
February 20, 2006 09:25
Subject:
[perl #38595] slow with unicode regexps
Message ID:
rt-3.0.11-38595-130378.8.1840309282002@perl.org
# New Ticket Created by  ags@mimuw.edu.pl 
# Please include the string:  [perl #38595]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=38595 >


This is a bug report for perl from ags@mimuw.edu.pl,
generated with the help of perlbug 1.35 running under perl v5.8.5.

#!/bin/perl

# The first one is slow (1.6sec on PentiumM 1.7)
# The second one and the third one are fast (0.1sec on PentiumM 1.7)

use encoding 'cp1250';

print time(), "\n";

my $f = "a" x 100000;
for my $i (1..3000) {
	$f =~ m/^(b?)/;
	my $w = $1;
}

print time(), "\n";

my $f = "a" x 100000;
for my $i (1..3000) {
	$f =~ m/^(b?)/;
}

print time(), "\n";

my $f = "a" x 100000;
for my $i (1..3000) {
	$f =~ m/^(a?)/;
}

print time(), "\n";
---
Flags:
    category=core
    severity=low
---
Site configuration information for perl v5.8.5:

Configured by gerrit at Tue Aug 10 12:33:37     2004.

Summary of my perl5 (revision 5 version 8 subversion 5) configuration:
  Platform:
    osname=cygwin, osvers=1.5.10(0.11642),
archname=cygwin-thread-multi-64int
    uname='cygwin_nt-5.1 inspiron 1.5.10(0.11642) 2004-05-25 22:07 i686
unknown unknown cygwin '
    config_args='-de -Dmksymlinks -Duse64bitint -Dusethreads -Doptimize=-O2
-Dman3ext=3pm'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=undef uselongdouble=undef
    usemymalloc=y, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe
-I/usr/local/include',
    optimize='-O2',
    cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe
-I/usr/local/include'
    ccversion='', gccversion='3.3.3 (cygwin special)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='ld2', ldflags =' -s -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib /lib
    libs=-lgdbm -ldb -lcrypt -lgdbm_compat
    perllibs=-lcrypt -lgdbm_compat
    libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s'
    cccdlflags=' ', lddlflags=' -s -L/usr/local/lib'

Locally applied patches:
    

---
@INC for perl v5.8.5:
    c
    \home\ags\lv
    /usr/lib/perl5/5.8.5/cygwin-thread-multi-64int
    /usr/lib/perl5/5.8.5
    /usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int
    /usr/lib/perl5/site_perl/5.8.5
    /usr/lib/perl5/site_perl
    .

---
Environment for perl v5.8.5:
    CYGWIN=nontsec nontea
    HOME=/home/ags
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/cygdrive/c/Program Files/Far:/usr/bin:/cygdrive/c/PROGRAM
FILES/THINKPAD/UTILITIES:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/c
ygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Program Files/ATI
Technologies/ATI Control Panel:/cygdrive/c/WINDOWS/Downloaded Program
Files:/cygdrive/c/IBMTOOLS/Python22:/cygdrive/c/Program Files/PC-Doctor for
Windows/services:/cygdrive/c/j2sdk1.4.2_03/bin:/cygdrive/c/Program
Files/orant/bin:/cygdrive/c/Program
Files/Microsoft.NET/SDK/v1.1/Bin/:/cygdrive/c/WINDOWS/Microsoft.NET/Framewor
k/v1.1.4322/:/cygdrive/c/Program Files/Microsoft Visual Studio .NET
2003/Vc7/bin/:/cygdrive/c/Program Files/Microsoft Visual Studio .NET
2003/Common7/IDE:/cygdrive/c/Program Files/Cepstral/bin:/cygdrive/c/Program
Files/Cepstral/lib:/cygdrive/c/Program Files/Microsoft SQL
Server/80/Tools/BINN
    PERL5LIB=c:\home\ags\lv
    PERL_BADLANG (unset)
    SHELL (unset)


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