Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
i hope for hints of what could be changed
The first hint that comes to mind is to perform the 1e8 function calls to foo() from inside C space, rather than from Perl space. On top of the significant reduction in overhead, one then might also get to take advantage of C optimizations that are lost when the C function is called from Perl. The following script aims at demonstrating the sort of savings you might get. I've changed foo() to be a little bit more than a no-op, in the hopes that it will remove the effect of clever C optimizations. (I don't know if I've been successful.): On my Ubuntu (16.04) box, running perl-5.26, the same script outputs: Cheers, Rob In reply to Re: Inline::C on Windows: how to improve performance of compiled code?
by syphilis
|
|