March 2013 Archives

Holy bloat, Batman!

Let's compare the latest constant.pm to a minimal equivalent: $ ./perl -Ilib -le 'print $^V'; /usr/bin/time -l ./perl -Ilib -le 'use constant X => 1..5; print X' 2>&1 | grep 'maximum resident' v5.17.10 3829760 maximum resident set size $ /usr/bin/time -l ./perl -I/tmp -le 'use constant X => 1..5; print X' 2>&1 | grep 'maximum resident' 1200128 maximum resident set size That's 2.6MB bloat to define a constant. (The culprit turns out to be utf8, natch, to handle Unicode constants. (Why, God?!)). For reference, /tmp/constant.pm…

About educated_foo

user-pic I blog about Perl.