Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Cost of validator is prohibitive #28
I noticed that creating instances of attr objects was expensive:
I see a factor of ~ 50x (0.8us vs 34 us) on my machine. A quick profiling shows that almost all the difference comes from the deepcopy in the
For non trivial classes with a few attributes, the construction cost quickly reaches the hundreds of us.
Hi, thanks for the detailed report!
I indeed haven’t cared much about creation performance until now and it seems like I was a bit too careful by using a public API that uses deep copy there.
Just iterating over