You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed a very big difference in execution time between using chardet.detect with a complete bytes string and using UniversalDetector.feed with chunks of 1 MB.
With a 100 MB file, composed only of "tests tests tests tests [....]":
chardet.detect takes ~64 seconds.
UniversalDetector.feed takes ~3 seconds.
With the previous file on which I appended a file in MacRoman of ~10 KB (containing the character ’ in MacRoman):
chardet.detect: I interrupted the execution after 20 minutes...
UniversalDetector.feed takes ~3 seconds.
In case you wonder what code I used, I compared the execution time of the following:
I noticed a very big difference in execution time between using
chardet.detect
with a complete bytes string and usingUniversalDetector.feed
with chunks of 1 MB.With a 100 MB file, composed only of "tests tests tests tests [....]":
chardet.detect
takes ~64 seconds.UniversalDetector.feed
takes ~3 seconds.With the previous file on which I appended a file in MacRoman of ~10 KB (containing the character
’
in MacRoman):chardet.detect
: I interrupted the execution after 20 minutes...UniversalDetector.feed
takes ~3 seconds.In case you wonder what code I used, I compared the execution time of the following:
chardet.detect
:UniversalDetector.feed
:The text was updated successfully, but these errors were encountered: