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)
| 61 | |
| 62 | |
| 63 | def _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 |
no test coverage detected