Newsgroups: comp.lang.c++, comp.lang.fortran, comp.compiler
From: Vincent Ma <vinm...@hotmail.com>
Date: 1999/04/12
Subject: Re: Why C is much slower than Fortran
Dear friends,
Thanks for the reply. Here are more detailed information: ------------------------------------------------------------- void main() short int ID[43][31][52]; int i,j,k,nlp,nmax; /* ============= set parameters ============== */ imax = 35; /* ============== input nmax ================= */ nmax = 1000; /* ----------- set initial conditions ---------- */ for(k = 1; k <= kmax-1; k++) ID[i][j][k] = 0; /* ############################## */ for (nlp = 0; nlp <= nmax; nlp++) } return; } --------------------------------------------------------------------------- -------------------------------------------- Fortran test code is same. I ran both on Pentium 133 with 64 meg RAM with MS Fortran -- 11 sec (i loop innermost) The difference is still a lot (6 times). I've tried many variations, it seems no You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||