Bug 10301 – Loops for 64 bit code should be aligned on 8 byte boundaries

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2013-06-08T10:36:27Z
Last change time
2024-12-13T18:07:55Z
Assigned to
No Owner
Creator
Walter Bright
Moved to GitHub: dmd#17590 →

Comments

Comment #0 by bugzilla — 2013-06-08T10:36:27Z
Juan Manual Cabo reports a substantial speedup for such with this code: ------------ import std.stdio; import std.datetime; int fibw(int n) { //Linear Fibonacci int a = 1; int b = 1; for (int i=2; i <= n; ++i) { int sum = a + b; a = b; b = sum; } return b; } void main() { auto start = Clock.currTime(); int r = fibw(1000_000_000); auto elapsed = Clock.currTime() - start; writeln(r); writeln(elapsed); } ----------------
Comment #1 by bearophile_hugs — 2013-06-08T11:15:23Z
Isn't loop alignment worth doing in 32 bit code too? GCC (and Clang) align loops even in 32 bit code since many years.
Comment #2 by juanmanuel.cabo — 2013-06-08T14:18:43Z
Link to the forum, with more info: http://forum.dlang.org/thread/[email protected]
Comment #3 by robert.schadek — 2024-12-13T18:07:55Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17590 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB