develooper Front page | perl.perl5.porters | Postings from September 2012

Re: Changing the Perl error message when a module is not found

Thread Previous | Thread Next
Nicholas Clark
September 20, 2012 00:53
Re: Changing the Perl error message when a module is not found
Message ID:
On Thu, Sep 20, 2012 at 08:40:57AM +0200, demerphq wrote:
> On 20 September 2012 06:05, bulk 88 <> wrote:

> > I have found that often trying to save space by using format string templates is self defeating for most strings and costs more image space than you think you are saving.
> >
> > I have 4 long interconnected topics I need to bring up
> >
> > - OP_DESC macro has a expansion bloat problem
> > - does a wrapper function need to be written for callers of OP_DESC?
> > - disabling C literal string alignment using Perl to expand C macros/generate C code, saves 1-8 bytes per string literal in RO image section on 32 bit X86, and separately, if possible, from 5 to 2 bytes of 32/64 x86 machine code in a function where a series of gotos can be written to 1 label that has a noreturn function (aka croak) (very common), or a series of gotos to 1 label that has a warn function (unlikely). The whole string aligner/compact string selector system can easily be disabled by redefining C macros for non-compatible platforms. I have a working example of both of these size reductions in a XS module that compiled and ran without side effects on x86 32/64 VC and Mingw Win32 Perls (4 permutations). I know Perl runs on many more platforms than those 4, so the idea might be a non-starter. This is a summary, not an exhaustive list of all the pros and cons I already know of.
> > -include examples of x86 machine code of why you generically got a larger image when you "saved a string" by consolidating format strings and how to visualize the break even point for format strings on X86
> >
> > I'm not sure how to organize my 4 topics.  So, what should I discuss in this thread? and what should I file new tickets for? and should I describe in detail with C examples of the disabling string literal alignment to save image space for warn/croak messages idea or is it a non-starter?
> >
> Personally I would like to hear whatever you have to say on the subject.

I'd be interested too. But, please, start a new thread for them.
They're self contained, and completely decoupled from the original subject
of this thread.

It seems from your initial description that the first two and the last two
might each be separate threads. But you warn that they are interconnected, so
do whatever seems most coherent.

Nicholas Clark

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About