No this doesn't help. You're still paying the cost of a function call. And function calls are s-l-o-w in Perl.

actually with filtering you don't pay for it, it is there or not (a bit like when you use dynamic linking and you switch some instrumenting lib for a non-instrumenting one -- so you can use a wrapper)

then with code like this

 foo() if $foo;

why do you pay for a function call?

anyway your comment reminds of that perl command line flag (-P) that calls the C preprocessor on your code... maybe it could be useful for this can of debugging?! (chess notation)

cheers --stephan p.s by the way for me true macros are lispish macros, the others do textual substitution (meaning not caring about syntax) and that can break easily like perl filters or cpp)

In reply to Re^3: Debug Macro by sgt
in thread Debug Macro by Outaspace

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.