develooper Front page | perl.perl5.porters | Postings from June 2013

[perl #118267] [PATCH] SV_CONST(XXX) - constant strings with precomputed hash values

From:
Ruslan Zakirov
Date:
June 1, 2013 14:15
Subject:
[perl #118267] [PATCH] SV_CONST(XXX) - constant strings with precomputed hash values
Message ID:
rt-3.6.HEAD-2552-1370096109-1559.118267-75-0@perl.org
# New Ticket Created by  "Ruslan Zakirov" 
# Please include the string:  [perl #118267]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=118267 >


This is a bug report for perl from ruz@bestpractical.com,
generated with the help of perlbug 1.39 running under perl 5.16.1.


-----------------------------------------------------------------
[Please describe your issue here]

Want to get ball rolling on this.

SV_CONST macro. Goal is to use existing optimizations in pp_method_named
for TIESCALAR, FETCH, POP and friends by using precomputed hash values
of these constant strings. You can find more details on this miniproject
in earlier thread [1]. 

Code is on github [2], just repushed the branch. Full diff [3].

So far I'm happy with the change and consider it's ready for full review
and merge into blead.

[1] http://markmail.org/message/khezkunng5ggosys
[2] https://github.com/ruz/perl5/commits/ruz/tie-method-calls
[3] https://github.com/ruz/perl5/compare/blead...ruz;tie-method-calls

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=low
---
Site configuration information for perl 5.16.1:

Configured by ruz at Tue Sep 11 03:03:12 MSK 2012.

Summary of my perl5 (revision 5 version 16 subversion 1) configuration:
   
  Platform:
    osname=darwin, osvers=12.1.0, archname=darwin-2level
    uname='darwin macbook-ruslan.local 12.1.0 darwin kernel version 12.1.0: tue aug 14 13:29:55 pdt 2012; root:xnu-2050.9.2~1release_x86_64 x86_64 '
    config_args='-de -Duserelocatableinc -Dprefix=/Users/ruz/perl5/perlbrew/perls/perl-5.16.1 -DDEBUGGING -Aeval:scriptdir=/Users/ruz/perl5/perlbrew/perls/perl-5.16.1/bin'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-common -DPERL_DARWIN -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/opt/local/include',
    optimize='-O3 -g',
    cppflags='-fno-common -DPERL_DARWIN -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/opt/local/include'
    ccversion='', gccversion='4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.60))', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-protector -L/opt/local/lib'
    libpth=/opt/local/lib /usr/lib
    libs=-lgdbm -ldbm -ldl -lm -lutil -lc
    perllibs=-ldl -lm -lutil -lc
    libc=, so=dylib, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/opt/local/lib -fstack-protector'

Locally applied patches:
    

---
@INC for perl 5.16.1:
    /Users/ruz/perl5/perlbrew/perls/perl-5.16.1/lib/site_perl/5.16.1/darwin-2level
    /Users/ruz/perl5/perlbrew/perls/perl-5.16.1/lib/site_perl/5.16.1
    /Users/ruz/perl5/perlbrew/perls/perl-5.16.1/lib/5.16.1/darwin-2level
    /Users/ruz/perl5/perlbrew/perls/perl-5.16.1/lib/5.16.1
    .

---
Environment for perl 5.16.1:
    DYLD_LIBRARY_PATH=/opt/oracle/instantclient-11.2.0.3.0-macosx-x64:
    HOME=/Users/ruz
    LANG=ru_RU.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/Users/ruz/perl5/perlbrew/bin:/Users/ruz/perl5/perlbrew/perls/perl-5.16.1/bin:/Users/ruz/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
    PERLBREW_BASHRC_VERSION=0.59
    PERLBREW_HOME=/Users/ruz/.perlbrew
    PERLBREW_MANPATH=/Users/ruz/perl5/perlbrew/perls/perl-5.16.1/man
    PERLBREW_PATH=/Users/ruz/perl5/perlbrew/bin:/Users/ruz/perl5/perlbrew/perls/perl-5.16.1/bin
    PERLBREW_PERL=perl-5.16.1
    PERLBREW_ROOT=/Users/ruz/perl5/perlbrew
    PERLBREW_VERSION=0.59
    PERL_BADLANG (unset)
    SHELL=/opt/local/bin/bash




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