On Feb 24, 2019, at 10:06 PM, Eric Snow email@example.com wrote:
I'll look into it in more depth tomorrow. FWIW, I have a few commits in the range you described, so I want to make sure I didn't slow things down for us. :)
Thanks for looking into it.
FWIW, I can consistently reproduce the results several times in row. Here's the bash script I'm using:
make clean ./configure make # Apple LLVM version 10.0.0 (clang-1000.11.45.5)
for i in `seq 1 3`; do git checkout d610116a2e48b55788b62e11f2e6956af06b3de0 # Go back to 2/23 make # Rebuild sleep 30 # Let the system get quiet and cool echo '---- baseline ---' >> results.txt # Label output ./python.exe Tools/scripts/var_access_benchmark.py >> results.txt # Run benchmark
git checkout 16323cb2c3d315e02637cebebdc5ff46be32ecdf # Go to end-of-day 2/24 make # Rebuild sleep 30 # Let the system get quiet and cool echo '---- end of day ---' >> results.txt # Label output ./python.exe Tools/scripts/var_access_benchmark.py >> results.txt # Run benchmark
- commit 175421b58cc97a2555e474f479f30a6c5d2250b0 (HEAD)
| Author: Pablo Galindo Pablogsal@gmail.com | Date: Sat Feb 23 03:02:06 2019 +0000 | | bpo-36016: Add generation option to gc.getobjects() (GH-11909)
$ ./python Tools/scripts/var_access_benchmark.py Variable and attribute read access: 18.1 ns read_local 19.4 ns read_nonlocal
These timings are several times larger than they should be. Perhaps you're running a debug build? Or perhaps 32-bit? Or on VM or some such. Something looks way off because I'm getting 4 and 5 ns on my 2013 Haswell laptop.