Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Subject: 1.3.12-1: dramatic slowdown of compiled executable - 2nd attempt To: cygwin AT cygwin DOT com Message-ID: From: apjaworski AT mmm DOT com Date: Wed, 3 Jul 2002 23:21:27 -0500 MIME-Version: 1.0 Content-type: multipart/mixed; Boundary="0__=09BBE17FDF85E3AA8f9e8a93df938690918c09BBE17FDF85E3AA" Content-Disposition: inline Note-from-DJ: This may be spam --0__=09BBE17FDF85E3AA8f9e8a93df938690918c09BBE17FDF85E3AA Content-type: text/plain; charset=us-ascii I am running Cygwin environment on an IBM Intellistation (1GHz PIII, 512Mb memory) with Windows 2000 Professional (SP 2). I am attaching the output of cygcheck -s -v -r. I hope that attachments can be handled by the discussion list server. Here is the problem again. A simple C code presented below (and also as an attachment) runs 24 times slower under cygwin1.dll versions 1.3.11 and 1.3.12 than under 1.3.10 (and numerous previous versions). Could somebody pleas confirm this? I compiled the code below using "gcc uu.c". Then I created a simple text file called "input" with 300,000 lines and 12 columns of floating point numbers. This is easy using a text editor - the lines can be the same. I ran it under current version of cygwin (1.3.12-1) using "time a.exe" and got 241.7s total time and 239.3s of user time. Then I replaced cygwin1.dll with version 1.3.10 and rerun the test. I got 10.7s total time and 8.7s user time. This is almost 24-fold slowdown! Here is my code. It is also attached, so one can simply detach and try it. As one can see it only does I/O and nothing else. =============================uu.c=================================== #include int main(int argc, char *argv[]) { int i, nobs; static float dat[300000][12]; char filein[6], fileout[7]; FILE *fp; strcpy(filein, "input"); strcpy(fileout, "output"); fp = fopen(filein, "r"); i = 0; while(fscanf(fp, "%f %f %f %f %f %f %f %f %f %f %f %f", &dat[i][0], &dat[i][1], &dat[i][2], &dat[i][3], &dat[i][4], &dat[i][5], &dat[i][6], &dat[i][7], &dat[i][8], &dat[i][9], &dat[i][10], &dat[i][11]) != EOF) i++; close(fp); nobs = i; printf("%d data lines read from %s\n", i, filein); fp = fopen(fileout, "w"); for(i=0; i