in reply to Re^8: Inline::C on Windows: how to improve performance of compiled code?
in thread Inline::C on Windows: how to improve performance of compiled code?

Defining PERL_NO_GET_CONTEXT doesn't stop it from running, but it doesn't improve performance one iota

But you've defined PERL_NO_GET_CONTEXT too late for it to have any effect.

It needs to be done prior to the inclusion of the 3 perl headers (EXTERN.h, perl.h and XSUB.h).
Hence, it needs to be done in the Inline::C Config section as
PRE_HEAD => '#define PERL_NO_GET_CONTEXT 1',
(The specified string, followed by a newline, will then be inserted in the generated XS file above the inclusion of those 3 headers.)

UPDATE:

I think you would be better off looking at ways to try and move some or all of your loop into C, rather than trying to optimise the calls from Perl to C

I totally agree with that. I think that's where the most significant savings will be found.

Cheers,
Rob
  • Comment on Re^9: Inline::C on Windows: how to improve performance of compiled code?
  • Download Code

Replies are listed 'Best First'.
Re^10: Inline::C on Windows: how to improve performance of compiled code?
by BrowserUk (Patriarch) on Jun 17, 2018 at 06:11 UTC
    PRE_HEAD => '#define PERL_NO_GET_CONTEXT 1',

    Ah yes. I'd completely forgotten about that.

    (A quick search of my test directory shows it was jan2015 the last time I played with this, and I've slept since then :) )


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
    In the absence of evidence, opinion is indistinguishable from prejudice. Suck that fhit