From owner-FreeBSD-users-jp@jp.freebsd.org  Thu Jan 30 19:25:11 1997
Received: by jaz.jp.freebsd.org (8.8.5+2.7Wbeta4/8.7.3) id TAA17500
	Thu, 30 Jan 1997 19:25:11 +0900 (JST)
Received: by jaz.jp.freebsd.org (8.8.5+2.7Wbeta4/8.7.3) with SMTP id TAA17495
	for <FreeBSD-users-jp@jp.freebsd.org>; Thu, 30 Jan 1997 19:25:10 +0900 (JST)
From: candy@fct.kgc.co.jp
Received: from uucp1.iij.ad.jp (uucp1.iij.ad.jp [192.244.176.73]) by mail0.iij.ad.jp (8.6.12+2.4W/3.3W9-MAIL) with ESMTP id TAA16564 for <FreeBSD-users-jp@jp.freebsd.org>; Thu, 30 Jan 1997 19:25:10 +0900
Received: (from uucp@localhost) by uucp1.iij.ad.jp (8.6.12+2.4W/3.3W9-UUCP) with UUCP id TAA04513 for FreeBSD-users-jp@jp.freebsd.org; Thu, 30 Jan 1997 19:25:09 +0900
Received: from xxx.fct.kgc.co.jp by vvv.kgc.co.jp (8.7.5/3.5W:96110814) id TAA12155; Thu, 30 Jan 1997 19:21:37 +0900 (JST)
Received: from localhost by xxx.fct.kgc.co.jp (8.7.5/3.3W8:95062916) id TAA12842; Thu, 30 Jan 1997 19:21:36 +0900 (JST)
Message-Id: <199701301021.TAA12842@xxx.fct.kgc.co.jp>
To: FreeBSD-users-jp@jp.freebsd.org
In-reply-to: "Naoki Kobayashi"'s message of 30 Jan 1997 16:29:46 +0900
References: <199701300522.OAA10786@xxx.fct.kgc.co.jp>
	<199701300644.PAA09112@puutalo.geo.titech.ac.jp>
Date: Thu, 30 Jan 1997 19:21:35 +0900
Reply-To: FreeBSD-users-jp@jp.freebsd.org
Precedence: bulk
X-Distribute: distribute [version 2.1 (Alpha) patchlevel=19]
X-Sequence: FreeBSD-users-jp 9279
Subject: [FreeBSD-users-jp 9279] Re: performance on numerical calculationdepends on shells?
Errors-To: owner-FreeBSD-users-jp@jp.freebsd.org
Sender: owner-FreeBSD-users-jp@jp.freebsd.org

> $B?@ED$5$s!$0lBNHk9&$H$O$J$s$G$7$g$&$M!%(B

  $B:G=*E*$K<!$N%W%m%0%i%`$KE~C#$7$^$7$?!#$h$=$N4D6-$G:F8=$9$k$+$I$&$+$O(B
$BITL@$G$9$,!#(B

------8<-------- nbody.c
#define n N*N*N
int main() {
  double rx[n];
  int i, j;
  memset(rx, 0, sizeof(rx));
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
	rx[i] = -rx[j]; /* '-' $B$NM-L5$G!"0[$k7k2L$K!&!&(B */
    }
  }
  return 0;
}
------8<--------
bash$ cc -O -DN=20 -onbody nbody.c
bash$ /usr/bin/time ./nbody; tcsh -c '/usr/bin/time ./nbody'; sh -c "tcsh -c '/usr/bin/time ./nbody'"
       12.46 real        11.85 user         0.02 sys
        7.03 real         6.96 user         0.00 sys
       12.85 real        12.55 user         0.02 sys

$BHk9&$O$3$3$+$i$G$9(B(^_^;

bash$ ln nbody 1; ln nbody 11; ln nbody 111
bash$ /usr/bin/time ./1; tcsh -c '/usr/bin/time ./1'; sh -c "tcsh -c '/usr/bin/time ./1'"
        7.45 real         7.37 user         0.00 sys
       12.74 real        12.64 user         0.00 sys
        7.59 real         7.44 user         0.01 sys
bash$ /usr/bin/time ./11; tcsh -c '/usr/bin/time ./11'; sh -c "tcsh -c '/usr/bin/time ./11'"
        7.51 real         7.42 user         0.01 sys
        7.75 real         7.69 user         0.02 sys
       12.40 real        12.29 user         0.01 sys
bash$ /usr/bin/time ./111; tcsh -c '/usr/bin/time ./111'; sh -c "tcsh -c '/usr/bin/time ./111'"
       12.50 real        12.34 user         0.02 sys
        7.03 real         6.92 user         0.01 sys
       12.01 real        11.85 user         0.01 sys

bash$ uname -srm
FreeBSD 2.1.5-RELEASE i386

candy@fct.kgc.co.jp ($B?@EDIR9-(B)
