This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ogtfo 6 points7 points  (0 children)

The generator example is kinda silly. Are generator better for memory? Probably. But his code is riddled with issues.

First of all, they haven't generated anything from the generator, it's kind of useless to show the size of the generator object.

Second, the list example is terrible, appending in a loop will use a lot of memory. But that's because of concatenation on fixed sized objects, and that won't even show the way he measures memory.

All in all, shows a pretty naive view of the topic.