Since the source code is interpreted while running, I think it might make a difference in Performance. What I mean is:
When you have a long (>9000 lines) code and then cut out as many spaces and linebreaks as possible, does it make the program run faster?
If so, does this apply to languages using bytecode (i.e. Java) too?
Your Python sourcecode (.py) is "compiled" into a representation that does away with all whitespace (.pyc). Instead of doing this transformation over and over again you can just run the .pyc files. So no, whitespace doesn't matter.
If you want performance the best thing to do is optimize your algorithm.
O(n), O(n^2), etc.) and try to improve that.In short: Leaving out whitespace is no good. Understandable code is the way to optimization.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With