http://qs1969.pair.com?node_id=1216778


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
PRE_HEAD => '#define PERL_NO_GET_CONTEXT 1',
in your scripts "Config" section.

If I don't define PERL_NO_GET_CONTEXT, then for me your script outputs:
Took 0.160126seconds 1000000
With PERL_NO_GET_CONTEXT defined it runs twice as quickly:
Took 0.072088seconds 1000000
(I've ignored the CCFLAGS output that is also produced.)
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