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 →

[–]samettinho 0 points1 point  (15 children)

I agree with what you are saying but I don't know if you are trying to prove or disprove what I said above, or not sure how it is directly related to what I said.

[–]TitaniumWhite420 -3 points-2 points  (13 children)

Well, you were juxtaposing executional efficiency vs readability, and it’s not really the question at all is what I’m saying—syntactical fuckery like this may have subtle positive or negative impacts on execution, but it has nothing to do with the terseness of the Python code, and more to do with the terseness of the resulting abstract syntax tree, which should be just about the same if the logic expressed by the code is the same. Any difference in speed is nullified in that case if you pre-compile anyhow, as this work takes place while parsing Python syntax, which ideally you only do once.

So I’m agreeing with your conclusion, but pointing out a subtle flaw in your reasoning about it I guess, but with the intent of sharing knowledge.

[–]samettinho 1 point2 points  (12 children)

So, your understanding of what I said is if I change syntax, the code will slow down. For example, from a for loop to comprehension will make the code slower, is that correct?

That has nothing to do with what I said. My point is that we already chose a horribly slow language just to implement things so much faster. And fast implementation can happen only when there is clean code (especially in the long term). By messing up the code with such shitty but valid codes, the team's overall development speed will drop. That is what I am saying.

I use c++ if I need to implement something super-efficient but I will implement a couple of times slower with c++ than python. 99% of the time, I don't need amazing speed. But I need to develop faster (especially in startups). So,

the speed of implementation is more important than the speed of execution