Commit 8dae8e0b authored by Erin van der Veen's avatar Erin van der Veen 💛

Merge branch 'gHash-documentation' into 'master'

Expand documentation of SDSIdentityHash to explain why gText/GraphCopy cannot be used

See merge request !529
parents e88a508a 0bd06435
Pipeline #47656 passed with stages
in 10 minutes and 22 seconds
......@@ -21,7 +21,23 @@ from Data.Set import :: Set
derive gText SDSNotifyRequest, RemoteNotifyOptions
//* This type is for internal purposes only.
/**
* This type is for internal purposes only.
*
* This hash allows for fast `Map`s from SDSs to other values in the `IWorld`.
* Previously, these were indexed using
*
* 1. The `gText` representation. This is not a good idea, because when `gText`
* is specialized not all parts of the value may be taken into account. (Also
* this is very slow and requires a lot of memory to create and store the
* string representations.)
* 2. A hash of the GraphCopy representation. This can however give a different
* hash for the same value. In particular this is the case for strings: for
* example, the last 7 bytes (3 on 32-bit systems) of a string of length 1
* are unused, and unspecified in the GraphCopy representation.
*
* For this reason we now use the dedicated hashing function `gHash`.
*/
:: SDSIdentityHash :== Int
//* This type is for internal purposes only.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment