Scalar::Util is not using XS in Fedora 8, leading to performance

Scalar::Util is not using XS in Fedora 8, leading to performance

am 27.11.2007 03:22:30 von anon24u

Hi,

I've very recently upgraded to Fedora 8 (with perl 5.8.8), and the
performance of my perl code tanked. With the help obtained in a
previous post (today's "performance problem" post, link below), I've
determined that the problem is the very high number of calls to
Scalar::Utils::refaddr(), for which the perl implementation is being
called instead of the C one.

The following shows that Scalar::Util does not see XS, for whatever
reason, and falls back to the slow perl implementation.

[me@hostname]$ perl -MScalar::Util=dualvar -e1
is only avaliable with the XS version at -e line 0
BEGIN failed--compilation aborted.

I am not sure what to do next -- no experience with XS. It was
suggested I reinstall Scalar::Util, but not sure if I do this via cpan
somehow, or even if that will fix the problem. Is there a CPAN module
I can install to fix this?

Thanks

http://groups.google.ca/group/comp.lang.perl.misc/browse_thr ead/thread/eb86178292744203/0e8cd72a3e43af21?hl=en#0e8cd72a3 e43af21

Re: Scalar::Util is not using XS in Fedora 8, leading to performance

am 27.11.2007 03:28:17 von anon24u

Well, I solved the problem after some more googling. For those it may
help, I simply did a force install of Scalar::Util, within the cpan
shell:

bash% cpan
cpan> force install Scalar::Util

This completely resolved the problem. Thanks to the guy in my
previous post who pointed me in the right direction.

Re: Scalar::Util is not using XS in Fedora 8, leading to performance

am 27.11.2007 04:10:58 von Ben Morrow

Quoth Gizbo :
>
> I've very recently upgraded to Fedora 8 (with perl 5.8.8), and the
> performance of my perl code tanked. With the help obtained in a
> previous post (today's "performance problem" post, link below), I've
> determined that the problem is the very high number of calls to
> Scalar::Utils::refaddr(), for which the perl implementation is being
> called instead of the C one.

Just out of interest: where did your original copy of S::U come from?
Did it come out of a rpm, or did you install it yourself and it failed
to find gcc? If Redhat are providing rpms with the pure-Perl version of
S::U, this could be quite a problem... :(.

Ben

Re: Scalar::Util is not using XS in Fedora 8, leading to performance problem

am 27.11.2007 16:23:22 von Charlton Wilbur

>>>>> "BM" == Ben Morrow writes:

BM> Just out of interest: where did your original copy of S::U
BM> come from? Did it come out of a rpm, or did you install it
BM> yourself and it failed to find gcc? If Redhat are providing
BM> rpms with the pure-Perl version of S::U, this could be quite a
BM> problem... :(.

They are (or at least were, the last time I dealt with them), and it
is.

Charlton




--
Charlton Wilbur
cwilbur@chromatico.net

Re: Scalar::Util is not using XS in Fedora 8, leading to performance

am 27.11.2007 18:17:36 von anon24u

> Just out of interest: where did your original copy of S::U come from?
> Did it come out of a rpm, or did you install it yourself and it failed
> to find gcc? If Redhat are providing rpms with the pure-Perl version of
> S::U, this could be quite a problem... :(.
>
> Ben

Hi Ben,

As far as I know, our sysadmin installed the Red Hat distribution as
is, and we do have gcc installed. I can't say definitively whether
this is a problem with our installation or the distribution though.

Re: Scalar::Util is not using XS in Fedora 8, leading to performance problem

am 27.11.2007 20:03:41 von Ted Zlatanov

On Mon, 26 Nov 2007 18:28:17 -0800 (PST) Gizbo wrote:

G> Well, I solved the problem after some more googling. For those it may
G> help, I simply did a force install of Scalar::Util, within the cpan
G> shell:

G> bash% cpan
cpan> force install Scalar::Util

G> This completely resolved the problem. Thanks to the guy in my
G> previous post who pointed me in the right direction.

This may make your life easier, as it doesn't require the shell:

perl -MCPAN -e'force(install => "Scalar::Util")'

Ted

Re: Scalar::Util is not using XS in Fedora 8, leading to performance problem

am 28.11.2007 15:40:24 von brian d foy

In article <8663zn7boy.fsf@lifelogs.com>, Ted Zlatanov
wrote:


> This may make your life easier, as it doesn't require the shell:
>
> perl -MCPAN -e'force(install => "Scalar::Util")'

even easier :)

% cpan -fi Scalar::Util

Re: Scalar::Util is not using XS in Fedora 8, leading to performance problem

am 28.11.2007 19:49:14 von Ted Zlatanov

On Wed, 28 Nov 2007 08:40:24 -0600 brian d foy wrote:

bdf> In article <8663zn7boy.fsf@lifelogs.com>, Ted Zlatanov
bdf> wrote:

>> This may make your life easier, as it doesn't require the shell:
>>
>> perl -MCPAN -e'force(install => "Scalar::Util")'

bdf> even easier :)

bdf> % cpan -fi Scalar::Util

Huh, that option is not documented as of 5.8.8, but it works. Thanks
for the info. Has the man page been fixed to show -f since? (I ask
since you're the author as of 5.8.8 :)

Ted