3 ms·
> So the point is valid - the code should be using tuples and not dictionaries or classes. Yes if this was "production code" but for the sake of comparison in
by exDM69 13y ago
> So the point is valid - the code should be using tuples and not dictionaries or classes.
Yes if this was "production code" but for the sake of comparison in this example it should be a Python class vs. C struct.
And as the text describes, a dict behaves similarly to a class in Python when it comes to runtime perf.