* If it's being framed as being applied to a small number of items on one machine, I'd mark down for premature optimization. Normally such assignments have a specific point, and going off the deep end with efficiency measuring often misses it.
* If it's being framed as being applied to huge data sets, asymptotic complexity is the metric to go off of.
* If it's being framed as a latency-dependent (UI, servers) then actual timing is the metric to grade off of.
I'd say that if you have an algo that is faster for small numbers, it usually doesn't really matter that it's faster. Small numbers go fast no matter what. Unless it's latency dependent, it's encouraging students to work on things that don't matter at all.
EDIT: spacing EDIT2: spelling
With big O notation, you're not interested in how fast an algorithm ever actually runs (for that is the realm of constant factors), but rather how its running time changes as the size of its input changes.
But yes, that was integal to the treatment of the subject. I remember having to determine what the worst-case of quicksort looks like as a part of an assignment to exhibit, in practice, best/average/worst case runtime of a number of sorts - and this was an freshman-level intro course. That particular problem was one of the most fun homeworks I've ever had - a rather satisfying solution.
[1] "Quicksort is a magical algorithm that theory tells us runs in O(n^2)"
That said, some abstraction is useful too.
Second, when I was a CS student I expected to be graded on my response to a particular problem. If you wanted me to roll my own sort, I expect that to be specified. If you want me to explain in comments why I chose certain algorithms say something in class. I'm not going to waste time implementing an efficient sorting algorithm for a 100 element list (or 1000 even) just to provide a TA with a nerdgasm.
I feel this article is asking if students should be graded on an arbitrarily deep rubric. I had enough to worry about as an undergrad without caring if a bored TA was going to dock me 10 points for calling Arrays.sort.
What I was trying to ask was: Should real world performance be more heavily weighed? I feel like right now all the CS curriculum focuses on is O() performance as the end all.
At Harvey Mudd College, we have a class based on the ACM which works similarly, though with relaxed runtime constraints: 42 minutes per problem. In practice, you rarely need more than a few seconds, but the 42 minute cutoff (combined with large problem sizes) is a great way to prevent people from using brute-force approaches when there's a smarter option available.
A good example of what I mentioned was an assignment this week. Last week, the input size was constrained to a thousand or so, and Floyd-Warshall was able to solve the problem. This week, it's the same problem, but with inputs up to ~50,000 in size. The old program, run on the new test cases, doesn't finish in a day.
I can actually kind of see this for embedded / small device programming. Embedded systems that can't meet their performance goals are useless and buying faster hardware is very costly option.
(1) he also believed not one of us submitted a C program to print "Hello, World!" that worked. It was a 8AM class and I had just driven 120miles (home visiting) through a blizzard to make it to class when he announced this fact in a dramatic fashion. I required calming down.
If you're doing web apps, application code is close to the last place I'd reasonably expect there to be severe performance issues. You're far, far more likely to either blow something architecturally ("We call a foreign API in the request/response cycle.") or flub settings where simple best practices produce repeatable results ("It is 2011 -- do you know where your gzip is?")
Sean gives his students two "challenge programs" a quarter. The first program is usually ultimately a matter of picking/optimizing the right data structure. We do graph algorithms by the 2nd half and so the later challenge problem is inevitably some graph algorithm.
The challenges are close to real world problems. For ex., our 2nd challenge program was to determine the maximum # of donations Obama could receive at any one time given a capacitance graph of his website's network topology (I took the class around the '08 election). We had to design, implement, and test everything by ourselves.
I don't agree with the naysayers who suggest that grading this way doesn't teach the really important software engineering tasks. You really had to feel out the problem domain in order to get the best optimization, and it the book answer wasn't always the best answer. Optimization is about a lot more than simply picking the right data structure or algorithm.
Partnering with the crazy russian genius with an 8086 instruction set in his head that quarter made me the C programmer I am today.
TL;DR Grading by benchmark makes students better programmers.
Performance is rarely on the most important requirement in software development.
If you don't believe me, watch Prof. Leiserson make this point.
http://ocw.mit.edu/courses/electrical-engineering-and-comput...
At a most elemental level, a program written by a CS student should work, that is, do what it is supposed to do for all legal inputs and provide meaningful diagnostics when it fails. That's hard, but that is the nature of programming.
Finding and choosing algorithms to accomplish a task (well defined or not) is also computer science. That is algorithmics and design. Doing a good job here is harder to measure and depends both a deep understanding of the available building blocks and the problem at hand. Moreover, trade-offs are involved and need to be resolved even though there is little real data to guide decisions. Seeing and exploiting invariant properties of the problem often enables better performance in some dimension; insight there is often called cleverness.
Equally important is the ability to see complex things in a simplified way by introducing abstractions. That's the only way to solve difficult, complex problems, and it is exceptionally difficult to codify.