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.
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.