English | 中文 | Русский | Français
2,747 Posts served
8,511 Conversations started
I just finished writing a 76 byte program.
I gave my Computer Architecture midterm yesterday. One of the four problems was to predict the output of a 17 byte program. This is with an assembly language where the bulk of the instructions are three bytes. The correct answer is of course 42, once the unconditional branch is successfully mutated to an untaken conditional branch.
C1 00 07 1C E1 00 07 04 00 0E 38 00 2A 00 41 00 0Alda adj,d
asla
sta adj,d
br skip
adj: .equate 7
msg: .ascii "8\x00*\x00"
skip: stro msg,d
.endOnly 20% of the class got it right, even though I told them days before they would. By the end of the semester they will be more adept. Earlier, I'd given them the project of writing a solution to the Tower of Hanoi problem in assembly language. A student challenged me to write it in under 100 bytes. My current version is 76 bytes and I see how to prune it down to 71 bytes.
The most bloated document editor on my computer is expressed in 27.6 megabytes, and while it is doing a lot more than the Tower of Hanoi problem, it is certainly not doing six orders of magnitude more work. Am I sniping my students by introducing them to arcane dark arts?
We are fast approaching a time when single CPU personal computers will be about as prevalent as clocks with mechanical hands. We can program parallel architectures with mechanical hands, but they may not perform as fast as we want them to.
Advocating "Teach Parallel" makes a lot sense. It may make make equal sense to "Teach Performance" as well. For at least the time being, they might just go hand in hand, quietly humming "Till There Was You".
| November 3, 2009 8:12 PM PST
wolfmurphy
|
Thanks Gastón. Today, Paul and I interviewed Sheldon Brown who also spoke about the importance of performance to his Center for Research in Computing and the Arts at UCSD. His current projects would not have been possible to generate in real-time without converting his algorithms to parallelism. |

Gastón C. Hillar
3,276
Status Points:
3,276
I do believe that developer must learn more about hardware and low level code. This way, they will pay attention to performance issues.
Cheers,
Gaston