[Issue 14571] [REG2.064] Large static arrays seem to lock up DMD
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri May 22 20:28:11 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14571
--- Comment #17 from Vladimir Panteleev <thecybershadow at gmail.com> ---
(In reply to Walter Bright from comment #16)
> (In reply to Vladimir Panteleev from comment #15)
> > DLLs are relocated at load time (and usually are linked with a base unlikely
> > to conflict, so relocations are often not done). The hypothetical ptr[5]
> > would be relocated as well.
>
> It goes through a relocation thunk. So does TLS.
I don't know what a "relocation thunk" is (no Google hits), but all offsets are
adjusted at load time, if that's what you mean.
> Win32 is dead. Even phones are 64 bit processors, aren't they?
Only the newer ones... and the phones don't use x86_64. Is the situation on ARM
the same?
> Furthermore, if you're accessing large arrays, the cost of getting a pointer
> to the start of it is utterly swamped by accessing the data itself. Like I
> said, I bet if you do some benchmarking, you'd be hard pressed to find ANY
> improvement of static large arrays over allocated ones.
I think you are right. But I also think that this is a valid, working pattern
in C/C++/Delphi programs, so it should be supported. There is value in having a
1:1 port of a program work as-is without refactorings to work around compiler
limitations.
--
More information about the Digitalmars-d-bugs
mailing list