Arnim Rupp added the comment:
oh, you're absolutely right about digest(), sorry, mixed the representation
with the data. closing this, thanks.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python t
New submission from Arnim Rupp :
Problem: hashlib only offers digest() and hexdigest() but the fastest way to
work with hashes is as integer.
The first thing loki does after getting the hashes is to convert them to int:
md5, sha1, sha256 = generateHashes(fileData
Change by Arnim Rupp :
--
components: +Regular Expressions -Library (Lib)
nosy: +ezio.melotti, mrabarnett
___
Python tracker
<https://bugs.python.org/issue42
Arnim Rupp added the comment:
some more observations, which might be helpful in tracking it down:
x$ is much faster than ^x
A$ is as slow as ^x
$ python3 -m timeit -s "a = 'A'*1" "import re" "re.search('x$', a)"
10 loops, best of 5:
New submission from Arnim Rupp :
The re lib needs 7 seconds to check if a billion As start with an x. So e.g.
this statement takes this long:
re.search(r'^x', 'A' * 10)
It takes longer, the longer the string is. The string handling is not the
problem, checking i