summaryrefslogtreecommitdiff
path: root/cpan
diff options
context:
space:
mode:
authorDaniel Dragan <bulk88@hotmail.com>2015-12-10 18:35:34 -0500
committerTony Cook <tony@develop-help.com>2016-01-07 10:25:16 +1100
commit8f1332ed63eb9a2061410b390e383415d456a7f4 (patch)
tree5aacbffde70e7be508d711fe7961691d54fc9352 /cpan
parenta98780ae0779fdda8d6c2bc706475093056a92bf (diff)
downloadperl-8f1332ed63eb9a2061410b390e383415d456a7f4.tar.gz
give Win32 miniperl a real getcwd for build perf
getcwd() is now 605x faster for Win32 miniperl. ------------------------------ use Cwd; Cwd::getcwd() for(0..10000); ------------------------------ before C:\p523\src\win32>timeit -f t.dat ..\miniperl -I..\lib t.pl Version Number: Windows NT 6.1 (Build 7601) Exit Time: 2:03 am, Thursday, December 10 2015 Elapsed Time: 0:01:12.438 Process Time: 0:00:14.289 System Calls: 5802378 Context Switches: 1455066 Page Faults: 5250724 Bytes Read: 76809789 Bytes Written: 5278717 Bytes Other: 10407004 after C:\p523\src\win32>timeit -f t.dat ..\miniperl -I..\lib t.pl Version Number: Windows NT 6.1 (Build 7601) Exit Time: 1:20 am, Thursday, December 10 2015 Elapsed Time: 0:00:00.119 Process Time: 0:00:00.124 System Calls: 4658 Context Switches: 540 Page Faults: 1127 Bytes Read: 99074 Bytes Written: 0 Bytes Other: 12888
Diffstat (limited to 'cpan')
-rw-r--r--cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/NoXS.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/NoXS.pm b/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/NoXS.pm
index 45faf7e230..df36e82c21 100644
--- a/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/NoXS.pm
+++ b/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/NoXS.pm
@@ -10,6 +10,15 @@ require XSLoader;
# Things like Cwd key on this to decide if they're running miniperl
delete $DynaLoader::{boot_DynaLoader};
+if ($^O eq 'MSWin32') {
+ require Win32;
+ my $GetCwd = *{'Win32::GetCwd'}{CODE};
+ my $SetChildShowWindow = *{'Win32::SetChildShowWindow'}{CODE};
+ %{*main::Win32::{HASH}} = ();
+ *{'Win32::GetCwd'} = $GetCwd;
+ *{'Win32::SetChildShowWindow'} = $SetChildShowWindow;
+}
+
# This isn't 100%. Things like Win32.pm will crap out rather than
# just not load. See ExtUtils::MM->_is_win95 for an example
no warnings 'redefine';