2 ms·
A big problem here, though, is that > array.array('B', list).tostring() is not terribly readable or beautiful. In fact, I think I'd need a comment to explain
by jMyles 10y ago
A big problem here, though, is that
> array.array('B', list).tostring()
is not terribly readable or beautiful.
In fact, I think I'd need a comment to explain that it's typecasting elements of a list strings to ints.
Optimizations like this are an identity crisis for Python (and have been for a long time, as evinced by the age of this essay): Is it focused on being human-readable and otherwise compliant with the Zen of Python?
Or is it focused on exposing high-performance variants for every way of doing something?
...and while it may be tempting to say that the answer is "both," this removes "one obvious way" as a lingual basis for Python.
Ultimately, there needs to be a reconciliation wherein these high-performance variants are folded back in (even if it means cheating in the implementation) to the idiomatic expressions.
Type hints and the evolving async syntax are additional considerations in this arena.
I know that this has been a topic of conversation at the language summit in the past; I surmise it will be very much so next month.
- pekk 10y agoThe people complaining about performance are always going to be louder.
- jMyles 10y agoSure, but what I'm saying is that, if the underlying philosophy of Python holds water, then we need to find ways of to overcome this tug-of-war and ensure that the most beautiful ways are also the most (or among the most) performant.