A program Harold Hill might like

By wolfmurphy (10 posts) on November 3, 2009 at 4:15 pm

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.

Only 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".

Categories: Academic, Parallel Programming, Uncategorized

Comments (2)

November 3, 2009 7:55 PM PST

Gastón C. Hillar
Total Points:
3,276
Status Points:
3,276
Black Belt
Excellent article!
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
November 3, 2009 8:12 PM PST

wolfmurphy
Total Points:
890
Status Points:
890
Black Belt
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.

Trackbacks (0)


Leave a comment  

To obtain technical support, please go to Software Support.
Name (required)*

Email (required; will not be displayed on this page)*

Your URL (optional)


Comment*