delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/11/17/06:26:06

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Mon, 17 Nov 2003 12:25:49 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: newlib AT sources DOT redhat DOT com
Cc: Wayne Hayes <wayne AT cs DOT toronto DOT edu>, cygwin AT cygwin DOT com
Subject: [wayne AT cs DOT toronto DOT edu: Cygwin-1.5.5 sscanf on floats: 20 times slower than 2 years ago]
Message-ID: <20031117112549.GF18706@cygbert.vinschen.de>
Reply-To: newlib AT sources DOT redhat DOT com
Mail-Followup-To: newlib AT sources DOT redhat DOT com,
Wayne Hayes <wayne AT cs DOT toronto DOT edu>, cygwin AT cygwin DOT com
Mime-Version: 1.0
User-Agent: Mutt/1.4.1i

Since scanf and the floating point arithmetic is implemented in newlib,
I've redirected this message there.  Does anybody have an idea, what
could slow down float scanning in sscanf by a factor of 20?

Corinna

----- Forwarded message from Wayne Hayes <wayne AT cs DOT toronto DOT edu> -----
> Date: Sun, 16 Nov 2003 09:54:31 -0500
> From: Wayne Hayes <wayne AT cs DOT toronto DOT edu>
> Subject: Cygwin-1.5.5 sscanf on floats: 20 times slower than 2 years ago
> To: cygwin AT cygwin DOT com
> 
> Hello.  Until recently I was running W2k with an ancient version of
> cygwin; I don't know what version it was, but if anybody cares I've
> put a copy of cygwin1.dll (dated 2001-May-20) at
> 
> 	http://www.cs.toronto.edu/~wayne/tmp/cygwin1-old.dll.gz
> 
> It worked fine on W2k for the past 2.5 years.
> 
> I recently upgraded to Windows XP and this old cygwin stopped working.
> No problem, I say, it's also time to upgrade cygwin, so I go install the
> most recent version.
> 
> Everything works fine, except one of my I/O intensive simulations starts
> running about 20 times slower!
> 
> After copious mucking about, I finally narrowed it down to sscanf: sscanf
> on double precisions numbers, such as
> 
>     double a;
>     char line [80];
>     fgets(line...)
>     sscanf(line, "%lf", &a);
> 
> runs about 20 times slower than in the old cygwin.  Replacing the sscanf
> with a call to atof gets back the old speed.  It's only noticable, of
> course, if you're scanning a huge file.  In my case, it's a 60MB file
> that contains tens of thousands of lines of ASCII floating point numbers.
> 
> So, consider this a bug report.  A slowdown of a factor of 20 is not really
> a good thing.
> 
> The output of "cygcheck -s -v -r > cygcheck.out" can be found at
> 
>     http://www.cs.toronto.edu/~wayne/tmp/cygcheck-XP-1.5.5.out.gz
> 
> Thanks!
> 
>     - Wayne
----- End forwarded message -----

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019