diff --git a/TUTORIAL.org b/TUTORIAL.org index 823b1a7..af1568b 100644 --- a/TUTORIAL.org +++ b/TUTORIAL.org @@ -169,7 +169,7 @@ out the elements in the same order, every time. When combined with binary serialization, this is Preserves' "canonical form". This is important and useful for many contexts, but especially for -cryptographic signatures. +cryptographic signatures and hashing. #+BEGIN_SRC preserves @"This hand-typed Preserves document..." @@ -185,8 +185,10 @@ cryptographic signatures. "noise": "ooh-ooh"}} #+END_SRC -This is a bit more expensive than normal serialization (because -sorting needs to occur), but is still quite fast in general. +Clever implementations can get canonicalized output for free by +carefully ordering set elements and dictionary entries at construction +time, but even in simple implementations, canonical serialization is +almost as cheap as normal serialization. ** Defining our own types using Records