octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #40562] Consider using PRINTF_EXPONENT_DIGITS


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #40562] Consider using PRINTF_EXPONENT_DIGITS on MinGW
Date: Wed, 13 Nov 2013 15:27:33 +0000
User-agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0

Follow-up Comment #1, bug #40562 (project octave):

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

>> x = rand (1e6, 1);
>> fid = fopen ("tst.txt", "wt");
>> tic; fprintf (fid, "%g\n", x); toc
Elapsed time is 4.25564 seconds.
>> fclose (fid)
ans = 0
>> x = rand (1e6, 1);
>> fid = fopen ("tst.txt", "wt");
>> tic; fprintf (fid, "%g\n", x); toc
Elapsed time is 4.28983 seconds.
>> fclose (fid)
ans = 0
>> x = rand (1e6, 1);
>> fid = fopen ("tst.txt", "wt");
>> tic; fprintf (fid, "%g\n", x); toc
Elapsed time is 4.24964 seconds.
>> fclose (fid)
ans = 0
>> x = rand (1e6, 1);
>> fid = fopen ("tst.txt", "wt");
>> tic; fprintf (fid, "%g\n", x); toc
Elapsed time is 4.24863 seconds.
>> fclose (fid)
ans = 0
>>
>> setenv ("PRINTF_EXPONENT_DIGITS", "2")
>> x = rand (1e6, 1);
>> fid = fopen ("tst.txt", "wt");
>> tic; fprintf (fid, "%g\n", x); toc
Elapsed time is 4.42566 seconds.
>> fclose (fid)
ans = 0
>> x = rand (1e6, 1);
>> fid = fopen ("tst.txt", "wt");
>> tic; fprintf (fid, "%g\n", x); toc
Elapsed time is 4.40966 seconds.
>> fclose (fid)
ans = 0
>> x = rand (1e6, 1);
>> fid = fopen ("tst.txt", "wt");
>> tic; fprintf (fid, "%g\n", x); toc
Elapsed time is 4.4936 seconds.
>> fclose (fid)
ans = 0
>> x = rand (1e6, 1);
>> fid = fopen ("tst.txt", "wt");
>> tic; fprintf (fid, "%g\n", x); toc
Elapsed time is 4.4866 seconds.
>> fclose (fid)
ans = 0
>>


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.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?40562>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]