B-Stats
view release on metacpan or search on metacpan
With B::C I introduced -fno-warnings for 5.13.5 to save 68KB executable size on 32-bit.
Uncompiled the number are of course obscenely higher.
2) use Carp
This requires XSLoader and also includes the huge B, at least when compiled.
The biggest hit is the Carp warning when AUTOLOAD a XS module fails. Then Carp is dynaloaded to print the callstack. Printing the callstack in case of dynaloader errors should seriously not be dependent on DynaLoader, it should be provided by the sta...
3) swash_init utf8
utf8_heavy is autoloaded whenever perl needs upper-case/lower-case folding tables. These tables include all unicode tables because we are not ASCII anymore, which are loaded as fat perl tables, not as fast c arrays as e.g. Encode or icu does. Perl mi...
There is no heuristic to check the string for possible non-ascii strings, there is no ascii pragma (no utf8 would be the correct name) to prevent from loading these tables.
With B::C I introduced -fno-fold for 5.13.9 to save 1.6MB executable size on 32-bit
when utf8 folding is not required.
Anyway, I'm now measuring the size of the optree at certain stages with my new module B::Stats. It unfortunately requires B, which itself includes 14 files, 3821 lines and ca. 4883 ops. I have to subtract this constant overhead, similar to a profiler...
B::Stats counts all ops statically at compile-time and end-time, to see which run-time loaded modules are added, and also counts the actually performed ops dynamically at run-time.
The B::Stats output also give you exact size and performance numbers independent of the CPU and machine load, contrary to heavy benchmarks. Of course certain ops are more costly than others, I haven't averaged yet the typical op costs to output bette...
( run in 0.392 second using v1.01-cache-2.11-cpan-88abd93f124 )