[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #40562] Consider using PRINTF_EXPONENT_DIGITS
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #40562] Consider using PRINTF_EXPONENT_DIGITS on MinGW |
Date: |
Wed, 13 Nov 2013 04:34:10 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0 |
URL:
<http://savannah.gnu.org/bugs/?40562>
Summary: Consider using PRINTF_EXPONENT_DIGITS on MinGW
Project: GNU Octave
Submitted by: rik5
Submitted on: Tue 12 Nov 2013 08:34:09 PM PST
Category: Libraries
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Feature Request
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Microsoft Windows
_______________________________________________________
Details:
I worked around the problem of failing tests on MinGW because of 3-digit
exponents here (http://hg.savannah.gnu.org/hgweb/octave/rev/6a381b9ae055).
However, I went on to investigate whether PRINTF_EXPONENT_DIGITS carries a
performance penalty as claimed. I found something like a 5% penalty, not a
300-400% penalty, so this might be a worthwhile option to turn on.
I used
x = rand (1e6, 1);
fid = fopen ("tst.txt", "wt");
tic; fprintf (fid, "%g\n", x); toc
fclose (fid)
Then I did the same test after using
setenv ("PRINTF_EXPONENT_DIGITS", "2")
I was running in a virtual machine and the timing precision on MinGW isn't
great, but the measured difference was small (~5%) with three runs for each
scenario.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?40562>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #40562] Consider using PRINTF_EXPONENT_DIGITS on MinGW,
Rik <=