Portál AbcLinuxu, 30. dubna 2025 16:50
paskma@ares:~$ free -g total used free shared buffers cached Mem: 31 7 23 0 0 6 -/+ buffers/cache: 0 31 Swap: 29 0 29
cat /proc/cpuinfo
a df -h
paskma@ares:~$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 6 model name : Intel(R) Xeon(TM) CPU 3.40GHz stepping : 8 cpu MHz : 3391.898 cache size : 16384 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 6 wp : yes flags : 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 ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cid cx16 xtpr lahf_lm bogomips : 6789.41 processor : 1 vendor_id : GenuineIntel cpu family : 15 model : 6 model name : Intel(R) Xeon(TM) CPU 3.40GHz stepping : 8 cpu MHz : 3391.898 cache size : 16384 KB physical id : 1 siblings : 4 core id : 0 cpu cores : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 6 wp : yes flags : 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 ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cid cx16 xtpr lahf_lm bogomips : 6783.19 processor : 2 vendor_id : GenuineIntel cpu family : 15 model : 6 model name : Intel(R) Xeon(TM) CPU 3.40GHz stepping : 8 cpu MHz : 3391.898 cache size : 16384 KB physical id : 2 siblings : 4 core id : 0 cpu cores : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 6 wp : yes flags : 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 ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cid cx16 xtpr lahf_lm bogomips : 6783.26 processor : 3 vendor_id : GenuineIntel cpu family : 15 model : 6 model name : Intel(R) Xeon(TM) CPU 3.40GHz stepping : 8 cpu MHz : 3391.898 cache size : 16384 KB physical id : 3 siblings : 4 core id : 0 cpu cores : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 6 wp : yes flags : 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 ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cid cx16 xtpr lahf_lm bogomips : 6783.24 processor : 4 vendor_id : GenuineIntel cpu family : 15 model : 6 model name : Intel(R) Xeon(TM) CPU 3.40GHz stepping : 8 cpu MHz : 3391.898 cache size : 16384 KB physical id : 0 siblings : 4 core id : 1 cpu cores : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 6 wp : yes flags : 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 ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cid cx16 xtpr lahf_lm bogomips : 6783.17 processor : 5 vendor_id : GenuineIntel cpu family : 15 model : 6 model name : Intel(R) Xeon(TM) CPU 3.40GHz stepping : 8 cpu MHz : 3391.898 cache size : 16384 KB physical id : 1 siblings : 4 core id : 1 cpu cores : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 6 wp : yes flags : 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 ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cid cx16 xtpr lahf_lm bogomips : 6783.25 processor : 6 vendor_id : GenuineIntel cpu family : 15 model : 6 model name : Intel(R) Xeon(TM) CPU 3.40GHz stepping : 8 cpu MHz : 3391.898 cache size : 16384 KB physical id : 2 siblings : 4 core id : 1 cpu cores : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 6 wp : yes flags : 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 ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cid cx16 xtpr lahf_lm bogomips : 6783.20 processor : 7 vendor_id : GenuineIntel cpu family : 15 model : 6 model name : Intel(R) Xeon(TM) CPU 3.40GHz stepping : 8 cpu MHz : 3391.898 cache size : 16384 KB physical id : 3 siblings : 4 core id : 1 cpu cores : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 6 wp : yes flags : 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 ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cid cx16 xtpr lahf_lm bogomips : 6783.39 processor : 8 vendor_id : GenuineIntel cpu family : 15 model : 6 model name : Intel(R) Xeon(TM) CPU 3.40GHz stepping : 8 cpu MHz : 3391.898 cache size : 16384 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 6 wp : yes flags : 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 ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cid cx16 xtpr lahf_lm bogomips : 6783.09 processor : 9 vendor_id : GenuineIntel cpu family : 15 model : 6 model name : Intel(R) Xeon(TM) CPU 3.40GHz stepping : 8 cpu MHz : 3391.898 cache size : 16384 KB physical id : 1 siblings : 4 core id : 0 cpu cores : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 6 wp : yes flags : 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 ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cid cx16 xtpr lahf_lm bogomips : 6783.36 processor : 10 vendor_id : GenuineIntel cpu family : 15 model : 6 model name : Intel(R) Xeon(TM) CPU 3.40GHz stepping : 8 cpu MHz : 3391.898 cache size : 16384 KB physical id : 2 siblings : 4 core id : 0 cpu cores : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 6 wp : yes flags : 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 ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cid cx16 xtpr lahf_lm bogomips : 6783.35 processor : 11 vendor_id : GenuineIntel cpu family : 15 model : 6 model name : Intel(R) Xeon(TM) CPU 3.40GHz stepping : 8 cpu MHz : 3391.898 cache size : 16384 KB physical id : 3 siblings : 4 core id : 0 cpu cores : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 6 wp : yes flags : 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 ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cid cx16 xtpr lahf_lm bogomips : 6783.26 processor : 12 vendor_id : GenuineIntel cpu family : 15 model : 6 model name : Intel(R) Xeon(TM) CPU 3.40GHz stepping : 8 cpu MHz : 3391.898 cache size : 16384 KB physical id : 0 siblings : 4 core id : 1 cpu cores : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 6 wp : yes flags : 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 ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cid cx16 xtpr lahf_lm bogomips : 6783.09 processor : 13 vendor_id : GenuineIntel cpu family : 15 model : 6 model name : Intel(R) Xeon(TM) CPU 3.40GHz stepping : 8 cpu MHz : 3391.898 cache size : 16384 KB physical id : 1 siblings : 4 core id : 1 cpu cores : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 6 wp : yes flags : 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 ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cid cx16 xtpr lahf_lm bogomips : 6783.28 processor : 14 vendor_id : GenuineIntel cpu family : 15 model : 6 model name : Intel(R) Xeon(TM) CPU 3.40GHz stepping : 8 cpu MHz : 3391.898 cache size : 16384 KB physical id : 2 siblings : 4 core id : 1 cpu cores : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 6 wp : yes flags : 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 ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cid cx16 xtpr lahf_lm bogomips : 6783.36 processor : 15 vendor_id : GenuineIntel cpu family : 15 model : 6 model name : Intel(R) Xeon(TM) CPU 3.40GHz stepping : 8 cpu MHz : 3391.898 cache size : 16384 KB physical id : 3 siblings : 4 core id : 1 cpu cores : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 6 wp : yes flags : 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 ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cid cx16 xtpr lahf_lm bogomips : 6783.34 paskma@ares:~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda5 184M 114M 70M 62% / udev 10M 100K 10M 1% /dev devshm 16G 0 16G 0% /dev/shm df: `/proc/bus/usb': Permission denied /dev/sda3 89M 26M 59M 31% /boot /dev/sda11 69G 4.2G 65G 6% /home /dev/sda10 4.7G 1.5G 3.3G 31% /tmp /dev/sda6 14G 3.2G 11G 23% /usr /dev/sda7 14G 1.4G 13G 10% /var /dev/sda9 1.8G 1.5G 210M 88% /var/cache/openafs AFS 8.6G 0 8.6G 0% /afs paskma@ares:~$Ad ty disky: ono je to napojeno na nějaký globální AFS (řádově terabajty), které tu nevidím. A ty procesory jsou s HT, takže je jich tam ve skutečnosti polovina.
(define (test a b c d) (let ((a (if (> a b) b a)) (b (if (> a b) a b))) (let ((b (if (> b c) c b)) (c (if (> b c) b c))) (let ((c (if (> c d) d c)) (d (if (> c d) c d))) (let ((b (if (> b c) c b)) (c (if (> b c) b c))) (let ((a (if (> a b) b a)) (b (if (> a b) a b))) (let ((b (if (> b c) c b)) (c (if (> b c) b c))) (< a b c d)))))))) (define *count* 0) (do ((i 0 (+ i 1))) ((= i 100)) (do ((j 0 (+ j 1))) ((= j 100)) (do ((k 0 (+ k 1))) ((= k 100)) (do ((l 0 (+ l 1))) ((= l 100)) (if (test i j k l) (set! *count* (+ *count* 1))))))) (display *count*)Je to poněkud hnusné, poněvadž jsem chtěl, aby to Stalin zkousnul, tudíž si leccos pohodlného z Gauche nemůžu dovolit
jhegenbart@dhcp57:~/stalin-0.11> time python test.py 0 real 2m43.235s user 2m35.394s sys 0m0.348s jhegenbart@dhcp57:~/stalin-0.11> time gosh test.sc 100000000 real 1m57.707s user 1m56.043s sys 0m0.456s jhegenbart@dhcp57:~/stalin-0.11> time ./test 100000000 real 0m0.676s user 0m0.632s sys 0m0.000sOčividně jsem obrátil kritérium pro čítač, ale to na věci asi moc nemění.
$ time python test.py python test.py 389.52s user 2.90s system 83% cpu 7:48.33 total1200MHz Thunderbird, popritom som normalne browsoval...
def s(a, b, c, d): if a > b: a,b = b,a if b > c: b,c = c,b if c > d: c,d = d,c if b > c: b,c = c,b if a > b: a,b = b,a if b > c: b,c = c,b return (a <= b) and (b <= c) and (c <= d) limit = 100 f = 0 for i1 in range(limit): for i2 in range(limit): for i3 in range(limit): for i4 in range(limit): if not s(i1, i2, i3, i4): f += 1
Darwin hayek.mat.lehigh.edu 8.9.0 Darwin Kernel Version 8.9.0: Thu Feb 22 20:54:07 PST 2007; root:xnu-792.17.14~1/RELEASE_PPC Power Macintosh powerpc
hayek:~ jik$ python
Python 2.3.5 (#1, Mar 20 2005, 20:38:20)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin
hayek:~ jik$ time -p python test.py
real 425.76
user 421.09
sys 1.23
393.47user 2.50system 8:10.18elapsed 80%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+735minor)pagefaults 0swapsPentium III M, 1066MHz
python test.py 1039,02s user 1,06s system 99% cpu 17:21,63 totalIBM Intellistation Pro E: Pentium II / 400 MHz
python test.py 189,07s user 0,02s system 99% cpu 3:09,54 totalSun Ultra 20: Opteron 144 / 1800 MHz
python test.py 1303,05s user 2,24s system 97% cpu 22:19,12 totalSGI O2: MIPS R10k / 250 MHz
real 1h 23min 51s user 1h 21min 34s sys 0m 0.76s
real 2m44.915s user 2m30.047s sys 0m0.862sAthlon64 3000+ na necelých 2,5 GHz
[danek@localhost ~]$ time ./limit.rb real 2m40.827s user 2m39.550s sys 0m0.996sPython
[danek@localhost ~]$ time ./limit.py real 6m5.944s user 6m1.363s sys 0m3.872sZ toho mi jednoznačně vyplívá že je ruby mnohem rychlejší než python
Z toho mi jednoznačně vyplívá že je ruby mnohem rychlejší než pythonTo je taky dobrá hláška...
Coz snad znamená, že se u rychlosti ruby blízká na lepší časi.To nepochibně.
Coz snad znamená, že se u rychlosti ruby blízká na lepší časi.Možná by stálo za úvahu se aspoň občas kouknout na pravidla.cz
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.