This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Store xio_ifp in sv_u in the SV head, reducing XPVIO by 1 pointer.
authorNicholas Clark <nick@ccl4.org>
Wed, 30 Jun 2010 09:46:09 +0000 (10:46 +0100)
committerNicholas Clark <nick@ccl4.org>
Wed, 30 Jun 2010 09:46:09 +0000 (10:46 +0100)
commit6f7e83539961a11c89e33c98b9799323e732d5f9
tree086222fb7e0ddedcc7cc6b024713359d16a346a8
parent5da80af416fe1cadcc86dcb161e4297f0ea37c63
Store xio_ifp in sv_u in the SV head, reducing XPVIO by 1 pointer.

When accessing a file handle for reading, this reduces pointer dereferences by
1, which will reduce CPU cache pressure.

As SVt_PVIO is also the default type provided to source filters, the code needs
to allow them to continue to use the sv_u for SvPVX(). Re-use the existing
IOf_FAKE_DIRP to signal this, as it's only set when a source filter is added.
sv.c
sv.h