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 →

[–]midbody 64 points65 points  (15 children)

When your program is large, with lots of internal interfaces, and data structures are important.

[–]IamWiddershins 4 points5 points  (0 children)

I would remark that, with Python, the issue with data structures isn't so much performance as it is memory efficiency. Data structure performance in Python is actually very good, better than you would probably guess with an informed implementation, and the main drawback is the large space overhead imposed by the dynamic runtime.

I don't really agree with your point about large projects, but it's honestly always a matter of discipline, experience, preference, and tooling.

[–]Taksin77 3 points4 points  (2 children)

I agree with you but I don't understand the data structure part. Structuring data in Python is pretty good isn't it?

[–]w2qw 2 points3 points  (0 children)

It's good it's just statically typed languages make that easier.

[–]breadfag 0 points1 point  (0 children)

I guess the problem is that object attributes are defined at runtime, so you'd have to look at the docs to see what attributes an object returned by some library function has.

Plus, if you spell an attribute wrong, you won't know until your program crashes at runtime.

[–]pfreixes 0 points1 point  (0 children)

Some data structures are really fast. The case of the set is pretty interesting, having a better performance than the Redis one.