bugGNU Octave - Bugs: bug #40562, Consider using...

 
 

bug #40562: Consider using PRINTF_EXPONENT_DIGITS on MinGW

Submitted by:  Rik <rik5>
Submitted on:  Wed 13 Nov 2013 04:34:09 AM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Feature Request
Status: NoneAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: Microsoft Windows

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 13 Nov 2013 03:27:33 PM UTC, comment #1:

FYI, run natively on a Win 8 machine at work (3.7.7+ dev versio of Nov 11):

so this environment setting doesn't seem to make much difference. At first looks it's indeed about 5 % slower.

After resetting it with

>> setenv ("PRINTF_EXPONENT_DIGITS", "")

the execution times didn't go down to ~4.27 secs as before, however. Octave needed to restart to get the original times from before this setting.

Philip Nienhuis <philipnienhuis>
Project Member
Wed 13 Nov 2013 04:34:09 AM UTC, original submission:

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.

Rik <rik5>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup