Back to General Improvement Techniques. On to Student Presentations (1).
Held Wednesday, May 2, 2001
Summary
Today we continue our study of optimization with an extended example.
Overview
for i := 1 to N do for j := 1 to N do B[i,j] := A[i,j]; for j := 1 to N do for i := 1 to N do B[i,j] := A[i,j]
LOOP: add t1, $1, t1 mul t1, $4, t2 ...
LOOP: add t2, $4, t2 ...
for i := 1 to n do for j := 1 to n do B[j,i] := A[i,j]
mov $1, i NEXT_OUTER: je i, n END_OUTER mov $1, j NEXT_INNER: je j, n, END_INNER sub i, $1, t1 mul t1, $4, t2 mul t2, n, t3 sub j, $1, t4 mul t4, $4, t5 add t3, t5, t6 mov offset(A,t6), t7 sub j, $1, t8 mul t8, $4, t9 mul t9, n, t10 sub i, $1, t11 mul t11, $4, t12 add t10, t12, t13 mov t7, offset(B,t13) add j, $1, j jump NEXT_INNER END_INNER: add i, $1, i jump NEXT_OUTER END_OUTER: ...
Monday, 22 January 2001
Wednesday, 2 May 2001
Back to General Improvement Techniques. On to Student Presentations (1).
[Current]
[Discussions]
[Glance]
[Honesty]
[Instructions]
[Links]
[Search]
[Syllabus]
Primary
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Project]
[Quizzes]
[Readings]
[Reference]
Sets
[Blackboard]
[98F]
Links
Disclaimer: I usually create these pages on the fly. This means that they are rarely proofread and may contain bad grammar and incorrect details. It also means that I may update them regularly (see the history for more details). Feel free to contact me with any suggestions for changes.
This page was generated by Siteweaver on Wed May 2 10:50:43 2001.
This page may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS362/2001S/outline.38.html
.
You may validate
this page's HTML.
The source was last modified Wed May 2 10:46:43 2001.