| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Are the benchmarks done with a POG+LTO build?
Sorry, something went wrong.
There was a problem hiding this comment.
I'm not a CSV expert, but here is a cursory review of the set logic. You should provide a (range of) benchmarks to back up the claim that it is twice as fast, though, ideally using pyperformance.
Sorry, something went wrong.
|
@picnixz @AA-Turner I really appreciate your feedback! It's great. I will provide more benchmarks, including with enabled optimizations and ideally with pyperformance, rephrase NEWS, and add in a whatsnew. |
Sorry, something went wrong.
|
Benchmarks without optimizations are not relevant so just run those with. |
Sorry, something went wrong.
|
@picnixz @AA-Turner @ZeroIntensity Thank you for all the comments:
|
Sorry, something went wrong.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
Thank you for your yesterday's review:
Thank you! |
Sorry, something went wrong.
|
Love the enthusiasm, but please try to avoid continuously rebasing (pressing "update branch"). It wastes CI time and also puts a ding in all of our inboxes. Updating the branch should generally only be done to resolve merge conflicts. |
Sorry, something went wrong.
|
FYI: I created a simple check ensuring that the output of csv.Sniffer()._guess_delimiter() did not change: |
Sorry, something went wrong.
There was a problem hiding this comment.
Overall, looks good but please add a test with corner cases when the guessing algorithm makes multiple rounds.
Sorry, something went wrong.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
There was a problem hiding this comment.
This looks fine to me but I want another core dev to have a look just in case I missed some obvious things (maybe @serhiy-storchaka?)
Sorry, something went wrong.
|
@ZeroIntensity @AA-Turner What do you think about this PR now? |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks!
Sorry, something went wrong.
|
Thanks! |
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 Windows11 Bigmem 3.x (tier-1) has failed when building commit 6be6f8f. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/#/builders/1079/builds/7354 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "R:\buildarea\3.x.ambv-bb-win11.bigmem\build\Lib\test\test_zipimport.py", line 934, in testZip64LargeFile
with open(os_helper.TESTFN, "wb") as f:
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device
Traceback (test.test_zipimport.DeflateCompressedZipImportTestCase.testTraceback) ... ok
Traceback (test.test_zipimport.UncompressedZipImportTestCase.testTraceback) ... ok
Traceback (most recent call last):
File "R:\buildarea\3.x.ambv-bb-win11.bigmem\build\Lib\test\test_zipimport.py", line 997, in testZip64LargeFile
with open(TEMP_ZIP, "wb") as f:
~~~~^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device
Traceback (most recent call last):
File "R:\buildarea\3.x.ambv-bb-win11.bigmem\build\Lib\test\test_zipimport.py", line 1000, in testZip64LargeFile
f.seek(offset, os.SEEK_SET)
~~~~~~^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device
Traceback (test.test_zipimport.ZStdCompressedZipImportTestCase.testTraceback) ... ok
|
Sorry, something went wrong.
|
Buildbot failure unrelated: "OSError: [Errno 28] No space left on device". I'll inform the owner. |
Sorry, something went wrong.
…faster (python#137628) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
The basic idea is not to iterate over all ASCII characters and count their frequency on each line in _guess_delimiter but only over present characters, and just backfill zeros.
Benchmark
There is no csv.Sniffer benchmark in pyperformance, so I created a simple benchmark instead:
using all 149 files from CSVSniffer (MIT License), reading only the sample, as recommended in docs.python.org example. That's what real users do, too. Unfortunately, it takes a few hours to run.
The result:
The full results (compare_to --table --table-format=md, and JSON files):
Correctness
I created a simple script to confirm that the output of Sniffer()._guess_delimiter() did not change. It uses ~1100 CSV files from the CSVSniffer project (MIT License).
The script:where Lib/csv_96b7a2eba423b42320f15fd4974740e3e930bb8b.py is https://github.com/python/cpython/blob/96b7a2eba423b42320f15fd4974740e3e930bb8b/Lib/csv.py from the main branch, and:
The result:
Environment
sudo ./python -m pyperf system tune ensured.
Notes