CLN/PERF: remove gc.collect from the setting_with_copy checks as not needed by jreback · Pull Request #27031 · pandas-dev/pandas (original) (raw)

This doesn't look might much of a perf gain, but in practice the gc collect can happen at odd times, so this change removes this uncertainty (and is much simpler code)

(pandas) bash-3.2$ asv continuous --bench chained_indexing master gc --config asv_bench/asv.conf.json 
· Creating environments
· Discovering benchmarks
· Running 2 total benchmarks (2 commits * 1 environments * 1 benchmarks)
[  0.00%] · For pandas commit d94146cf <master> (round 1/2):
[  0.00%] ·· Building for conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt...........
[  0.00%] ·· Benchmarking conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt
[ 25.00%] ··· Running (indexing.ChainIndexing.time_chained_indexing--).
[ 25.00%] · For pandas commit ab6cb31d <gc> (round 1/2):
[ 25.00%] ·· Building for conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt...
[ 25.00%] ·· Benchmarking conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt
[ 50.00%] ··· Running (indexing.ChainIndexing.time_chained_indexing--).
[ 50.00%] · For pandas commit ab6cb31d <gc> (round 2/2):
[ 50.00%] ·· Benchmarking conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt
[ 75.00%] ··· indexing.ChainIndexing.time_chained_indexing                                                                                                                                                                                      ok
[ 75.00%] ··· ====== ==========
               mode            
              ------ ----------
               None   72.6±5ms 
               warn   67.2±4ms 
              ====== ==========

[ 75.00%] · For pandas commit d94146cf <master> (round 2/2):
[ 75.00%] ·· Building for conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt...
[ 75.00%] ·· Benchmarking conda-py3.6-Cython-matplotlib-numexpr-numpy-openpyxl-pytables-pytest-scipy-sqlalchemy-xlrd-xlsxwriter-xlwt
[100.00%] ··· indexing.ChainIndexing.time_chained_indexing                                                                                                                                                                                      ok
[100.00%] ··· ====== ==========
               mode            
              ------ ----------
               None   69.4±4ms 
               warn   79.5±4ms 
              ====== ==========


BENCHMARKS NOT SIGNIFICANTLY CHANGED.