Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of nicholas (3034)

Friday December 23, 2005
06:34 AM

Un-Ouch

[ #28107 ]

Dan noticed that my estimates of the pain of POSIX were somewhat an under-estimate.

Anyway, all this started because I thought I'd figured out how to reduce it a bit. And it seems that I did.

Before

$ ./perl -Ilib -MDevel::Size=total_size -le 'use POSIX(); print total_size(\%::);'
247707
$ ./perl -Ilib -MDevel::Size=total_size -le 'use POSIX; print total_size(\%::);'
790956

After

$ ./perl -Ilib -MDevel::Size=total_size -le 'use POSIX(); print total_size(\%::);'
279172
$ ./perl -Ilib -MDevel::Size=total_size -le 'use POSIX; print total_size(\%::);'
532234

So a bit of an increase if you don't export any symbols, but a big decrease for the default setting. Coming soon to a perl 5.9.3 near you.

And the constants now inline properly:

$ ./perl -Ilib -MO=Concise -MPOSIX -le 'print SEEK_SET'
6  <@> leave[1 ref] vKP/REFC ->(end)
1     <0> enter ->2
2     <;> nextstate(main 428 -e:1) v ->3
5     <@> print vK ->6
3        <0> pushmark s ->4
4        <$> const(IV 0) s ->5
-e syntax OK

In all released perls they can't:

$ perl -MO=Concise -MPOSIX -le 'print SEEK_SET'
8  <@> leave[1 ref] vKP/REFC ->(end)
1     <0> enter ->2
2     <;> nextstate(main 117 -e:1) v ->3
7     <@> print vK ->8
3        <0> pushmark s ->4
6        <1> entersub[t1] lKS/TARG,1 ->7
-           <1> ex-list lK ->6
4              <0> pushmark s ->5
-              <1> ex-rv2cv sK/129 ->-
5                 <$> gv(*SEEK_SET) s ->6
-e syntax OK

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.