in reply to Re^5: Inline::C on Windows: how to improve performance of compiled code?
in thread Inline::C on Windows: how to improve performance of compiled code?
Why is it necessary to call Perl_get_context() 9 times for EVERY CALL to such a simple function?
I think that is unnecessary and I would expect that those Perl_get_context() calls could be removed by declaring
If I don't define PERL_NO_GET_CONTEXT, then for me your script outputs:
AIUI, the problem with defining PERL_NO_GET_CONTEXT in Inline::C scripts is that it causes breakage if any of the Inline::C functions call Perl API functions.
But none of the functions in your script call Perl API functions, so it's ok to define PERL_NO_GET_CONTEXT.
Could it be that the hint that vr is looking for is simply to "define PERL_NO_GET_CONTEXT" ?
Cheers,
Rob
I think that is unnecessary and I would expect that those Perl_get_context() calls could be removed by declaring
in your scripts "Config" section.PRE_HEAD => '#define PERL_NO_GET_CONTEXT 1',
If I don't define PERL_NO_GET_CONTEXT, then for me your script outputs:
With PERL_NO_GET_CONTEXT defined it runs twice as quickly:Took 0.160126seconds 1000000
(I've ignored the CCFLAGS output that is also produced.)Took 0.072088seconds 1000000
AIUI, the problem with defining PERL_NO_GET_CONTEXT in Inline::C scripts is that it causes breakage if any of the Inline::C functions call Perl API functions.
But none of the functions in your script call Perl API functions, so it's ok to define PERL_NO_GET_CONTEXT.
Could it be that the hint that vr is looking for is simply to "define PERL_NO_GET_CONTEXT" ?
Cheers,
Rob
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^7: Inline::C on Windows: how to improve performance of compiled code?
by BrowserUk (Patriarch) on Jun 16, 2018 at 17:48 UTC | |
by syphilis (Archbishop) on Jun 17, 2018 at 03:33 UTC | |
by BrowserUk (Patriarch) on Jun 17, 2018 at 04:07 UTC | |
Re^7: Inline::C on Windows: how to improve performance of compiled code?
by vr (Curate) on Jun 16, 2018 at 23:40 UTC | |
by BrowserUk (Patriarch) on Jun 17, 2018 at 04:00 UTC | |
by syphilis (Archbishop) on Jun 17, 2018 at 04:41 UTC | |
by BrowserUk (Patriarch) on Jun 17, 2018 at 06:11 UTC |
In Section
Seekers of Perl Wisdom