On Sun, 2005-02-20 at 16:20 +0000, Nick Ing-Simmons wrote:
> Dirk Koopman <[EMAIL PROTECTED]> writes:
> >In my interfacing to my library I am starting hit performance issues related
> >to extracting values from the library and passing to perl.

<snip>

> >Questions:
> >
> >1. Why on earth don't the macros change on non-threaded perls (like wot I am
> >   using)?
> 
> They do. The expansions suggest your perl is threaded.
> 

I agree they do, but it isn't (or at least I have not commanded it to
be):-

[EMAIL PROTECTED] perl-5.8.5]$ ffperl -V
Summary of my perl5 (revision 5 version 8 subversion 5) configuration:
  Platform:
    osname=linux, osvers=2.6.8.1-10mdk, archname=i386-linux
    uname='linux ldirkkoopman.int.causeway.com 2.6.8.1-10mdk #1 wed sep
8 17:00:52 cest 2004 i686 intel(r) pentium(r) 4 cpu 2.66ghz unknown
gnulinux '
    config_args='-Dprefix=/opt/perl -Doptimize=-g -O -Duseshrplib
-Darchname=i386-linux -Dlocincpth=/usr/include/db4 -des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-DDEBUGGING -fno-strict-aliasing -pipe
-I/usr/include/db4 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/include/gdbm',
    optimize='-g -O',
    cppflags='-DDEBUGGING -fno-strict-aliasing -pipe -I/usr/include/db4
-I/usr/include/gdbm'

etc...

> >2. Why are they inline when they really could(/should) be functions if they
> >   are this big?
> 
> Last time we tried (long ago) making them functions slowed things down.
> They may have got big enough now to be worth trying again but that is 
> non trivial.
> 

And just to add this to the general maw of info, I did a ./Configure;
make; make clean with different optimisations. Now look at the numbers:-

-Doptimize='-march=i686 -O4'

u=3.34  s=0.92  cu=196.46  cs=23.01  scripts=823  tests=84930
make[2]: Leaving directory `/home/djk/perl-5.8.5'
make[1]: Leaving directory `/home/djk/perl-5.8.5'

-Doptimize='-g'

All tests successful.
u=3.06  s=0.76  cu=185.84  cs=21.5  scripts=823  tests=84930
make[2]: Leaving directory `/home/djk/perl-5.8.5'
make[1]: Leaving directory `/home/djk/perl-5.8.5'

This test is completely unscientific, is done only once etc. But the
numbers are the correct way around.

Dirk
-- 
Dirk Koopman <[EMAIL PROTECTED]>

Reply via email to