[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dennou-ruby:000785] NumArray / NArray
����Ǥ���
�٥���ޡ����η������³���Ǥ���
����ϡ����Ȥ���˥����Ȥ��������Τǡ�benchmark.rb �� bmbm ��
�����ؿ���ȤäƤ�äƤߤޤ�����
����������̰켰��ź�դ��ޤ����Τǡ����ƤߤƤ���������
�긵��2�ĤδĶ��Ǽ¹Ԥ�����̤Ǥ���
��Ӥˤ� 50*50*50, 100*100*100 ��3���������C����Ʊ���ǿ���1��������)��
�Ѥ���float �� complex �ˤĤ��Ƥ�äƤߤޤ���(����������������¤�
���ä����ƤΥѥ�������Ƥ��ޤ���)��
����Ʊ���� float �� "shisoku" ����ʬ�� C, Fortran90 �Ȥ���ӤǤ��ޤ���
���Τ����ΰ��㡧
Mobile Pentium III 600MHz �ˤ����� float �� 100*100*100 ����η��
-----------------------------------------------------------------------
float, (100, 100, 100)
### NArray vs. NumArray ###
+++ shisoku +++
Rehearsal --------------------------------------------
NArray 0.170000 0.160000 0.330000 ( 0.323462)
NumArray 0.320000 0.150000 0.470000 ( 0.472790)
----------------------------------- total: 0.800000sec
user system total real
NArray 0.270000 0.070000 0.340000 ( 0.335321)
NumArray 0.380000 0.200000 0.580000 ( 0.575265)
+++ shisoku (with scalar) +++
Rehearsal --------------------------------------------
NArray 0.210000 0.110000 0.320000 ( 0.315216)
NumArray 0.410000 0.160000 0.570000 ( 0.574298)
----------------------------------- total: 0.890000sec
user system total real
NArray 0.180000 0.120000 0.300000 ( 0.295989)
NumArray 0.390000 0.180000 0.570000 ( 0.569698)
+++ shisoku (with scalar, coerced) +++
Rehearsal --------------------------------------------
NArray 0.220000 0.100000 0.320000 ( 0.321818)
NumArray 0.400000 0.180000 0.580000 ( 0.578127)
----------------------------------- total: 0.900000sec
user system total real
NArray 0.200000 0.110000 0.310000 ( 0.318140)
NumArray 0.410000 0.170000 0.580000 ( 0.575682)
+++ math +++
Rehearsal --------------------------------------------
NArray 0.830000 0.080000 0.910000 ( 0.906774)
NumArray 0.700000 0.140000 0.840000 ( 0.843123)
----------------------------------- total: 1.750000sec
user system total real
NArray 0.820000 0.080000 0.900000 ( 0.901240)
NumArray 0.690000 0.150000 0.840000 ( 0.841207)
+++ sum, av, rms +++
Rehearsal --------------------------------------------
NArray 0.280000 0.070000 0.350000 ( 0.349015)
NumArray 0.140000 0.000000 0.140000 ( 0.135953)
----------------------------------- total: 0.490000sec
user system total real
NArray 0.300000 0.050000 0.350000 ( 0.345805)
NumArray 0.140000 0.000000 0.140000 ( 0.137402)
+++ max, min +++
Rehearsal --------------------------------------------
NArray 0.100000 0.000000 0.100000 ( 0.095346)
NumArray 0.090000 0.000000 0.090000 ( 0.095207)
----------------------------------- total: 0.190000sec
user system total real
NArray 0.100000 0.000000 0.100000 ( 0.097235)
NumArray 0.090000 0.000000 0.090000 ( 0.090692)
+++ transpose +++
Rehearsal --------------------------------------------
NArray 0.170000 0.030000 0.200000 ( 0.199335)
NumArray 0.580000 0.040000 0.620000 ( 0.645481)
----------------------------------- total: 0.820000sec
user system total real
NArray 0.190000 0.010000 0.200000 ( 0.203835)
NumArray 0.550000 0.050000 0.600000 ( 0.597789)
#### shisoku in gcc (10 iterations of +-*/) ####
real 0m1.103s <-- 10���֤��Ƥ�Τ�
user 0m1.000s <-- �����Ӥ��뤿��ˤ�
sys 0m0.060s <-- ����ˤ�10ʬ��1�ˤ���
-----------------------------------------------------------------------
���Ȥ����
| GC��ǽ��malloc�ʤɤαƶ��ⵤ�ˤȤ�Ƥ����Ƥ���������RAA������
| ����Ƥ�ۡ���ڡ����Τۤ��ˤϤ����դ�Ƨ�ޤ��Ƥ���ڤ�bmbm�Ȥ����ؿ�
| ���Ѱդ����Ǥ��֤��Ƥ���ޤ���
�Ȥ��������Ȥ������Ƥ���Ǥ�������̤θ��������ޥ����褯�狼���
�����ٶ����Ǥ��ߤޤ���ʬ����ˤʤ�������������������
# "Rehearsal"����ʬ����GC��ǽ��malloc�ʤɤαƶ��פΤ�����ʬ���Ȼפäơ�
# ���β��η�̤�Ƥ����Ф����Τ��ʤȻפä���Ǥ����ġ�
������Τ�į��Ƶ����Ĥ������Ȥϡ�
���ץ�åȥե�����ˤ�餺���¿��λ�§�黻�˴ؤ��� NumArray �� NArray ��
��٤ƿ����٤���
��ʣ�ǿ��η��˴ؤ��� NumArray �������٤�����§���Ǥߤ�ȡ��¿��Τ�
���ο��ܻ��֤������롣
��"math" �� "sum, av, rms" �ˤĤ��Ƥ� NArray �� NumArray �Ǥ��ޤ꺹���ʤ���
"max, min" �ˤĤ��Ƥ� NumArray �Τۤ�������®����
�Ȥ��ä��Ȥ����Ǥ���
���줫�顤�����������ɤΤۤ��⸫�Ƥߤ褦�Ȥ��Ƥ���ΤǤ�������� C �ηи�
���ۤȤ�������ʤ��Τǡ��ޤ������Ƥ���Τ�������ޤǤ˻��֤�����
�ꤽ���Ǥ�����������ץ������Υܥȥ�ͥå��Ĥ���Ȥ������Ȥˤʤ�ȡ�
�ȤƤ�û���֤ˤϤǤ��ޤ���
����ˤĤ��ƤϺ���β���Ȥ������Ȥˤ����Ƥ��������ơ��������� C ���ٶ���
�������Ȼפ��ޤ���
����Υ�ݡ��ȤȤ��ƤϤ���ʤȤ����Ǥ���
--
���� �� (KOSHIRO Tsuyoshi) <t.koushiro@xxxxxx>
�ٻ��̥��ա��������ԡ�(��) �Ķ������ƥ���ȿ���� �����ƥ���
��̳�� >> �̿����縦��� �ż��ȷ�¬���� �߿�졼�����롼��
mailto:koshiro@xxxxxx TEL:042-327-6880 FAX:042-327-6666
benchtest.tar.gz
n