MCPcopy Create free account
hub / github.com/cxapython/catvm / _fast_hash

Function _fast_hash

selenium/scrapy_splash/utils.py:63–70  ·  view source on GitHub ↗

Return a hash for any JSON-serializable value. Hash is not guaranteed to be the same in different Python processes, but it is very fast to compute for data structures with large string values.

(value)

Source from the content-addressed store, hash-verified

61
62
63def _fast_hash(value):
64 """
65 Return a hash for any JSON-serializable value.
66 Hash is not guaranteed to be the same in different Python processes,
67 but it is very fast to compute for data structures with large string
68 values.
69 """
70 return _json_based_hash(_process(value))
71
72
73_hash_cache = {} # fast hash => hash

Callers 1

json_based_hashFunction · 0.85

Calls 2

_json_based_hashFunction · 0.85
_processFunction · 0.85

Tested by

no test coverage detected