more useful options | |
PerlMonks |
Re^3: Inline::C's AoA is much bigger than Perl'sby almut (Canon) |
on Mar 17, 2009 at 02:31 UTC ( [id://751089]=note: print w/replies, xml ) | Need Help?? |
The remaining difference in speed is most likely due to strlen of "foo" being recomputed every time in the inner loop (i.e. the zero in newSVpv(foo, 0) ). Precomputing it once (as Perl can do too, because the "foo" in "foo" x $n_cols is by definition fix) — i.e.
makes any XS vs. Perl speed difference go away (or at least statistically insignificant). (Without this optimisation I did observe a small, but consistent difference — approx. 5% on average.)
In Section
Seekers of Perl Wisdom
|
|