[Issue 14256] Poor IO performance on 64-bit dmd 2.066 (OS X)

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Mar 8 05:38:35 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14256

Ivan Kazmenko <gassa at mail.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gassa at mail.ru

--- Comment #2 from Ivan Kazmenko <gassa at mail.ru> ---
I tested the same on Win64 with dmd -m32 and dmd -m64 (options "-O -release
-inline -noboundscheck").

I have three test files:
1000000 lines of length 100 each (gen1.d),
10000 lines of length 10000 each (gen2.d),
100 lines of length 1000000 each (gen3.d).

Here are my test results:

Entry                                       test1     test2     test3
Number of lines                           1000000     10000       100
Length of each line                           100     10000   1000000
------------------------------------------------------------------------
Python 2.7.5 x32:                            0.60      0.41      0.36
Python 2.7.7 x64:                            0.59      0.42      0.36
DMD 2.067.0-b3 byLine -m32:                  0.53      1.27      1.77
DMD 2.067.0-b3 byLine -m64:                  2.32      1.98      2.06
DMD 2.067.0-b3 readln -m32:                  0.52      1.29      1.89
DMD 2.067.0-b3 readln -m64:                  2.33      2.02      2.05
DMD 2.067.0-b3 read+splitLines -m32:         0.40      0.39      0.37
DMD 2.067.0-b3 read+splitLines -m64:         0.37      0.28      0.28

Here, I see at least two separate concerns:

1. The functions byLine and readln suffer from long lines with -m32.
2. The functions byLine and readln are a few times slower than possible with
-m64.

The behavior of read + splitLines is satisfactory
(outperforms Python in both 32-bit and 64-bit mode) in my setup.

--


More information about the Digitalmars-d-bugs mailing list