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

G

Gizbo

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....44203/0e8cd72a3e43af21?hl=en#0e8cd72a3e43af21
 
G

Gizbo

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.
 
B

Ben Morrow

Quoth Gizbo said:
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
 
C

Charlton Wilbur

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
 
G

Gizbo

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.
 
T

Ted Zlatanov

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
 
T

Ted Zlatanov

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top