How Fast is Running Perl in Cygwin or Using NTFS on Linux? (The Price You Pay for Layers and Emulations)

By Xah Lee. Date: . Last updated: .

Here is a speed comparison of running a Perl script on Microsoft Windows vs Linux, using native vs non-native port, and using native vs non-native file system.

Moral:

Don't Use Window Style Path in Cygwin

cygwin window path 2020-05-10 s8y43
Cygwin window path http://cygwin.com/cygwin-ug-net/using.html#pathnames-win32

Tech Detail

The Perl script validates local links of HTML files is at Perl: Validate Local Links

The script goes over 8.2k HTML files. Files that don't end in “.html” are skipped by regex. (there are a total of 23.3k files. 3.1 Giga bytes (lots image files))

----------
linux, everything native.
real    0m6.608s
user    0m5.844s
sys     0m0.448s

----------
Linux, over NTFS
real    8m11.333s
user    0m44.507s
sys     0m50.135s

----------
Strawberry Perl.

real 35s

----------
Cygwin Perl, using unix style dir path. For example, $inDirPath = "/cygdrive/c/Users/h3/web/";

real    0m55.175s
user    0m10.686s
sys     0m15.896s

----------
Cygwin Perl, using Windows style dir path. For example, $inDirPath = "c:/Users/h3/web";

real    18m34.533s
user    0m27.721s
sys     1m10.060s

My system info:

◆ uname -a
Linux xah-p6813w 3.2.0-37-generic-pae #58-Ubuntu SMP Thu Jan 24 15:51:02 UTC 2013 i686 athlon i386 GNU/Linux
◆ xah@xah-p6813w◆ 2013-02-05 19:42 ◆ ~/web/xahlee_info/comp
◆ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS"