岡田です。
最近、何気なくpentium3-M 1.0GHz マシーンである EVO N410c で
ビデオエンコードしてみたら思いのほか遅くないことに気付いてしまいました。
ビデオフォーマットは divx です。比較対照は pentium4 2.4GHz + P4P800 です。
cat /proc/cpuinfo の切り抜きは
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 2.40GHz
stepping : 9
cpu MHz : 2405.518
cache size : 512 KB
と
cpu family : 6
model : 11
model name : Mobile Intel(R) Pentium(R) III CPU - M 1000MHz
stepping : 4
cpu MHz : 996.693
cache size : 512 KB
です。
そこで、どれくらいpentium4が遅いのか調べてみるために添付のような
ベンチマークプログラムを作ってみて比較すると
pentium4 2.4GHz -- 3.820秒
pentium3 1.0GHz -- 1.260秒
ついでに
pentiumMMX 0.266GHz -- 3.880秒
3倍ぐらいpentium4の方が遅く、クロックあたりに直すと7倍以上遅いと
いうことが解りました。
こういう結果を見るとAthlon64はどうなのか買い換えも含めて
気になってくるのですが、どなたかAthlon64で実行してみてくださる
奇特なかたいらっしゃりませんか?
cc -O3 bench.c
time a.out
です。
cc のバージョンは gcc version 3.2.2 でした。
-- bench.c ------------------------------------------------------
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
static void aa( float[],float[] );
int
main( ac,av )
int ac;
char **av;
{
#define DN 1024
float data1[DN];
float data2[DN];
int i;
for ( i=0;i<DN;i++ )
{
if ( i&1 )
data1[i]=(float)i;
else data1[i]= -(float)i;
data2[i]=0;
}
for ( i=0;i<10000;i++ )
{
aa( data1,data2 );
aa( data2,data1 );
}
exit( 0 );
}
static void
aa( float d1[DN],float d2[DN] )
{
int i;
float f;
for ( i=0;i<DN;i++ )
{
f=d1[i];
if ( f>0 )
d2[i]=f;
else d2[i]=f + d2[i];
}
}
Follow-Ups:
- [fol] Re: pentium3 と pentium4 の条件分岐ベンチTakao Ono
- [fol] Re: pentium3 と pentium4 の条件分岐ベンチMOCHIDA Shuji
- Prev by Date: [fol] Re: Meine geilen Bilder
- Next by Date: [fol] Re: pentium3 と pentium4 の条件分岐ベンチ
- Previous by thread: [fol] Re: Meine geilen Bilder
- Next by thread: [fol] Re: pentium3 と pentium4 の条件分岐ベンチ
- Indexes:[Main][Thread]