good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Looks to me, "C from C" on Windows got optimized away
I don't think so. (Could be wrong but.) A clearer ilustration is (hopefully) this script: As it stands, with optimization enabled, it outputs (on Windows): Now that second value does look like something was optimized away. I'm thinking the loop is simply doing nothing at each iteration. When we switch optimization off by including the "OPTIMIZE => '-O0'" line, the output changes to (on Windows): The "C from C" code now takes 500 times longer to execute - because, I think, this time foo() is actually being called at each iteration. But it's still 50 times quicker than calling "C from Perl". I've no useful ideas regarding things that can be done to enable Windows to access C subs as quickly as it can access Perl subs - and that's the main reason that I'm avoiding that aspect. Cheers, Rob In reply to Re^3: Inline::C on Windows: how to improve performance of compiled code?
by syphilis
|
|