[Issue 18627] std.complex is a lot slower than builtin complex types at number crunching

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jul 5 16:33:48 UTC 2020


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

--- Comment #10 from Iain Buclaw <ibuclaw at gdcproject.org> ---
(In reply to ponce from comment #4)
> This benchmark is a variation that does only division.
> 
> --- divide.d

* With gdc -O2 -frelease -m64

With cfloat: 11 secs, 204 ms, 475 μs, and 2 hnsecs
With cdouble: 13 secs, 420 ms, 497 μs, and 6 hnsecs
With Complex!float: 4 secs, 689 ms, 546 μs, and 2 hnsecs
With Complex!double: 8 secs, 903 ms, 172 μs, and 4 hnsecs

* With gdc -O2 -frelease -m32

With cfloat: 29 secs, 471 ms, 678 μs, and 9 hnsecs
With cdouble: 29 secs, 176 ms, 189 μs, and 2 hnsecs
With Complex!float: 13 secs, 379 ms, 856 μs, and 8 hnsecs
With Complex!double: 18 secs, 240 ms, 975 μs, and 5 hnsecs

Native complex floating point must die.

--


More information about the Digitalmars-d-bugs mailing list