3 ms·
Your computer is evidently faster than my phone; how fast was y() for you? Also you are missing a comma in your would-be tuple.
by kragen 7y ago
Your computer is evidently faster than my phone; how fast was y() for you?
Also you are missing a comma in your would-be tuple.
- Dylan16807 7y agoFor what it's worth I got about 196 and 131 for the original y and w, and after adding __slots__ (with comma) I got 186 and 123.
- kragen 7y agoThe fact that the difference is 10ms and 8ms respectively suggests that the speedup of attribute access isn't what's showing up in your measurements. In one case we access the slot "a" once; in the other case we access it five times. How can that be a 20% difference?