This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mdk
Recipients abarry, mdk, serhiy.storchaka, sjpalt, vstinner
Date 2016-12-07.07:06:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1481094361.0.0.822574682374.issue28866@psf.upfronthosting.co.za>
In-reply-to
Content
> issue28866.diff always invalidates the cache, so it works. But it is suboptimal, IMO it defeats the whole purpose of a cache.

Not sure about defeating the purpose of the cache as I only invalidate in setattr, getattr are still cache hitting. I tried:

$ python3 -m performance run --python=./python --rigorous -b all -o master.json
$ git checkout issue28866; make -j 8
$ python3 -m performance run --python=./python --rigorous -b all -o issue28866.json
$ python3 -m performance compare master.json issue28866.json

And I don't see much differences, probably only noise as I get some faster tests:

### call_method_unknown ###
Median +- Std dev: 56.8 ms +- 3.3 ms -> 52.9 ms +- 1.6 ms: 1.08x faster
Significant (t=12.92)

### pybench.IfThenElse ###
Median +- Std dev: 247 ns +- 3 ns -> 224 ns +- 16 ns: 1.11x faster
Significant (t=15.15)

and some slower:
### pybench.StringPredicates ###
Median +- Std dev: 1.89 us +- 0.05 us -> 2.18 us +- 0.21 us: 1.15x slower
Significant (t=-15.20)

### unpack_sequence ###
Median +- Std dev: 207 ns +- 4 ns -> 231 ns +- 27 ns: 1.12x slower
Significant (t=-11.63)

I'm not yet accustomed to this perf suite, so I may miss something obvious. I'll ran it again on master to measure the noise and should probably fine-tune my system for stability.

I'll also try a benchmark without the cache for comparison.
History
Date User Action Args
2016-12-07 07:06:01mdksetrecipients: + mdk, vstinner, serhiy.storchaka, abarry, sjpalt
2016-12-07 07:06:00mdksetmessageid: <1481094361.0.0.822574682374.issue28866@psf.upfronthosting.co.za>
2016-12-07 07:06:00mdklinkissue28866 messages
2016-12-07 07:06:00mdkcreate