Last active
January 4, 2016 15:19
-
-
Save bokutin/8640186 to your computer and use it in GitHub Desktop.
少し気になったLLのコンパイル所要時間
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use feature ":5.10"; | |
#my @dirs = qw( | |
# /usr/ports/games/sl | |
#); | |
my @dirs = qw( | |
/usr/ports/lang/lua | |
/usr/ports/lang/perl5.18 | |
/usr/ports/lang/python27 | |
/usr/ports/lang/python33 | |
/usr/ports/lang/ruby20 | |
); | |
my @elapsed; | |
for my $dir (@dirs) { | |
chdir $dir; | |
system("make depends"); | |
system("make clean"); | |
system("make configure"); | |
my @output = `time make 2>&1`; | |
my $ports_name = $output[0] =~ /^===> Building for (.*)$/ ? $1 : die; | |
my $time = $output[-1] =~ /^\s*(\S.*\S)\s*$/ ? $1 : die; | |
say $_ for "--> $dir", $ports_name, $time; | |
push @elapsed, "--> $dir", $ports_name, $time; | |
} | |
say $_ for @elapsed; | |
__END__ | |
# ほぼアイドルのレプリケーションサーバー | |
# dmesg | head | |
Copyright (c) 1992-2013 The FreeBSD Project. | |
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 | |
The Regents of the University of California. All rights reserved. | |
FreeBSD is a registered trademark of The FreeBSD Foundation. | |
FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013 | |
root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 | |
gcc version 4.2.1 20070831 patched [FreeBSD] | |
CPU: Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz (3093.04-MHz K8-class CPU) | |
Origin = "GenuineIntel" Id = 0x306a9 Family = 0x6 Model = 0x3a Stepping = 9 | |
Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE> | |
# ./compile_time.pl | |
--> /usr/ports/lang/lua | |
lua-5.1.5_6 | |
1.07 real 2.78 user 0.29 sys | |
--> /usr/ports/lang/perl5.18 | |
perl5.18-5.18.2 | |
54.76 real 145.68 user 15.24 sys | |
--> /usr/ports/lang/python27 | |
python27-2.7.6_1 | |
59.66 real 70.83 user 5.52 sys | |
--> /usr/ports/lang/python33 | |
python33-3.3.3_1 | |
74.59 real 93.73 user 6.47 sys | |
--> /usr/ports/lang/ruby20 | |
ruby20-2.0.0.353_4,1 | |
39.94 real 88.22 user 10.44 sys | |
# 開発用VM on VMWare Fusion 6 on OSX 10.9 Macbook Air mid 2012 | |
# dmesg | head | |
Copyright (c) 1992-2012 The FreeBSD Project. | |
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 | |
The Regents of the University of California. All rights reserved. | |
FreeBSD is a registered trademark of The FreeBSD Foundation. | |
FreeBSD 9.1-RELEASE-p5 #0: Sat Jul 27 01:14:23 UTC 2013 | |
root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 | |
CPU: Intel(R) Core(TM) i7-3667U CPU @ 2.00GHz (2494.04-MHz K8-class CPU) | |
Origin = "GenuineIntel" Id = 0x306a9 Family = 6 Model = 3a Stepping = 9 | |
Features=0xfa3fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,DTS,MMX,FXSR,SSE,SSE2,SS> | |
Features2=0xfeba2203<SSE3,PCLMULQDQ,SSSE3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND,HV> | |
# ./compile_time.pl | |
--> /usr/ports/lang/lua | |
lua-5.1.5_6 | |
2.51 real 3.03 user 1.86 sys | |
--> /usr/ports/lang/perl5.18 | |
perl5.18-5.18.2 | |
133.14 real 224.78 user 36.41 sys | |
--> /usr/ports/lang/python27 | |
python27-2.7.6_1 | |
88.62 real 95.37 user 16.08 sys | |
--> /usr/ports/lang/python33 | |
python33-3.3.3_1 | |
113.73 real 122.62 user 19.43 sys | |
--> /usr/ports/lang/ruby20 | |
ruby20-2.0.0.353_4,1 | |
107.63 real 154.94 user 27.74 sys | |
# 雑感 | |
VMWareゲストのプロセッサ数は2つ。 | |
コア数の影響度は Perl > Ruby > Python ?? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment