develooper Front page | perl.perl5.porters | Postings from March 2013

Re: File::Spec in XS

Thread Previous | Thread Next
March 7, 2013 10:12
Re: File::Spec in XS
Message ID:
bulk88 wrote:
>considered adding a newSVpvs_share("File::Spec::Unix") to MY_CXT,
>then comparing SvPVXes of SV* invocant and against the shared SV key
>name before doing the memcmp? It might prevent a memcmp.

memcmp isn't that expensive.  gcc inlines it.  (It comes out as a "repz
cmpsb" on x86_64, rather than the two wordwise comparisons that I'd
expected for this constant-length case.  Current CPUs have some nifty
logic to perform string ops in larger chunks, though.)


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About