From 3cd87c1cee65fc27e556a438d4a7d74430cf304c Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Wed, 19 Dec 2018 16:47:22 -0500 Subject: [PATCH] Update tape.md --- tape.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tape.md b/tape.md index f673de14..0d09c0d4 100644 --- a/tape.md +++ b/tape.md @@ -122,11 +122,11 @@ Performance consideration: We can skip the content of an array entirely by acces JSON objects are represented using two 64-bit tape elements. - The first 64-bit tape element contains the value `('{' << 56) + x` where the payload `x` is 1 + the index of the second 64-bit tape element on the tape. -- The second 64-bit tape element contains the value `('{' << 56) + x` where the payload `x` contains the index of the first 64-bit tape element on the tape. +- The second 64-bit tape element contains the value `('}' << 56) + x` where the payload `x` contains the index of the first 64-bit tape element on the tape. In-between these two tape elements, we alternate between key (which must strings) and values. A value could be an object or an array. -All the content of the array is located between these two tape elements, including arrays and objects. +All the content of the object is located between these two tape elements, including arrays and objects. Performance consideration: We can skip the content of an object entirely by accessing the first 64-bit tape element, reading the payload and moving to the corresponding index on the tape.