I doubt the O() for the ease of programming is anywhere near the O()s he's talking about. Say the language is an average of 10 times slower due to being easier to program for. This doesn't make much of a difference when you compare it to a for loop inside a for loop for every item. The O(10n) is pretty inconsequential when you compare that to O(n^2) since 10 items gives 100 vs 100, but 1000 items gives 10000 vs 1000000.
No, it's fine. I think you and I agree that he's making a bigger deal out of this than it really is. He seems to be approaching Python from a C/C++ perspective. While knowing the underlying language behind most implementations of Python (that's C, in case you didn't know) can be valuable, I have the feeling that there are going to be times during this course where I'm going to be questioning what language he really wants us to program in.
Yeah, probably is making more of a fuss of it than need be. I'm not sure how he's really approaching it, but O() can be really important. Problem is that it's really hard to see how without good examples, kind of the whole Java course all over again
( ... )
He was talking about how Python implements its lists, which are done in C as an array of pointers, and how sorting items in an array used as a stack can make a difference. He talked about how implementing a stack such that the top is at position 0 in the stack as opposed to the length of the array minus one can make a big difference since in the former case all the items have to be shifted if another item is pushed onto the stack, and if the array is full another, bigger array has to be created and all the items in the first array have to be copied to it. While I found this to be interesting I don't see how it will affect us much when we're using Python since all that's hard-coded into Python anyway; we can't control it unless we learn some C as well.
Comments 5
Apologies if I'm just restating the obvious.
Reply
Reply
Reply
Maybe he was just making us aware of it?
Reply
Leave a comment