Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Fri, 21 Nov 2003 16:34:44 -0500
From: Christopher Faylor <cgf-no-personal-reply-please@cygwin.com>
To: "J. Johnston" <jjohnstn@redhat.com>
Cc: Wayne Hayes <wayne@cs.toronto.edu>, newlib@sources.redhat.com,
   cygwin@cygwin.com
Subject: Re: [wayne@cs.toronto.edu: cygwin-1.5.5 sscanf on floats: 20 times slower than 2 years ago]
Message-ID: <20031121213444.GD18828@redhat.com>
Reply-To: cygwin@cygwin.com, newlib@sourceware.org
Mail-Followup-To: "J. Johnston" <jjohnstn@redhat.com>,
	Wayne Hayes <wayne@cs.toronto.edu>, newlib@sources.redhat.com,
	cygwin@cygwin.com
References: <03Nov17.130546edt.453219-16291@jane.cs.toronto.edu> <3FBE6D21.1080305@redhat.com> <3FBE7A8A.6080005@redhat.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <3FBE7A8A.6080005@redhat.com>
User-Agent: Mutt/1.4.1i

On Fri, Nov 21, 2003 at 03:50:18PM -0500, J. Johnston wrote:
>J. Johnston wrote:
>>Wayne Hayes wrote:
>>
>>>>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?
>>>
>>>
>>>
>>>Thanks!  Just to be pedentic, I realized that it's worse than a factor 
>>>of 20.
>>>My *entire simulation* slows down by a factor of 20; there's significant
>>>other computation in it.  So the scanf slowdown is probably closer to
>>>hundreds of times.  *Something* fishy must be going on.  :-)
>>>
>>
>>The reason for the slow down is long double support.  A new routine 
>>_strtold is used instead of _strtod_r.  I am working on a patch to use 
>>the old routine for non-long-doubles to avoid the slow down.
>
>Patch checked in.

I'm generating a new snapshot now:  http://cygwin.com/snapshots.html .
It will be interesting to hear if this solves the problem.

Btw, would using hardware floating point help here at all?  I managed to
get newlib to build with hardware floating point earlier but I wasn't
sure what the consequences of doing that would be (other than the fact
that cygwin wouldn't work on a x386).

cgf

--
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/

