Re: [Cbor] Record proposal

Kris Zyp <> Fri, 12 November 2021 04:15 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id B61B53A1193 for <>; Thu, 11 Nov 2021 20:15:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Status: No, score=-2.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id rEXjrPe7TzXN for <>; Thu, 11 Nov 2021 20:15:17 -0800 (PST)
Received: from ( [IPv6:2a00:1450:4864:20::52d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 4A9893A1192 for <>; Thu, 11 Nov 2021 20:15:17 -0800 (PST)
Received: by with SMTP id w1so32561369edd.10 for <>; Thu, 11 Nov 2021 20:15:17 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vQzWbfkLKfTT6PBdT1ra5E2+wu5QUgO8Dm6Kvx/RaVc=; b=pYH9yeO7kT48bFcP/CuysvQQgVMg/0p0+8pVkQQinnrcGY9w8jhn1M9DXTe1dvfBGe suMujORdpBiqVdLpmWuyMhs2sL7UVClOrfvvrR064JID5vfGGZ2NhJz18wvEp5aVDE53 vOkGr0rOqdrF8QQBchwqCiPPC1Kfsm/vkf32uQZ8VHdJdTI/FECG88Sbnygh44rIQVTI cYTl16OVC9mpspaNPJcPEMawOl3y1HdGpzJpoYXnJfxWViMbcyFzzTbMjD3ggQdEZAnO g5KI1s5pTqXrbuaTCZGUEkZQiFR4myzYcZnyxUFhIMzO716z4YQBwLisjE1iGRX/FOvo UqYw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vQzWbfkLKfTT6PBdT1ra5E2+wu5QUgO8Dm6Kvx/RaVc=; b=W0bVhzyj+/KoVRk+XNqKfwk04aRux1YlOfVLhrFcDK2yuptKBQIA462MjoA3Ymcx3q fKdVjsVk+77hQ97Lcu5gsnvnovfowfe68oFZcs9gaxOxU9qS+NqYKY0ATs1Xe9ze9+ez YwVEtqJ0wJPsaqBuGpLPUmOWHlP10gRzJNOmBlptz+z4YCS4V9k+qM3K5/bsI21+VT/z T1+yQ5BHdYhSt/dhEmk7uOQvbZjtii00T1nTkQJNH72A69dpJ/r6cpSvL+ZEFLgMptjl 0rY1ayjwfzw81DSyt8CGDlLehGq6x29e5sQ5FjOqHNEnbGayjKhUFckO4Am97NcxgMK5 6hhw==
X-Gm-Message-State: AOAM532g8nW7bbMisZ7Jrd5xN4OXWFXS5mWE4SFsUEU2us5EgZQqTBfs OusuDDtFYfoC6Qb0I9g2dIDGVA6NEE8HM+m4I1pdWb9u27U=
X-Google-Smtp-Source: ABdhPJyfa+luUYJEYr/1Q6wCOno4qd2gmmM5lNKsn8+AgZSmzHjBSLclIRSOvkIyhfLpX7Qp/MIytsAZQ4lF+u53iTs=
X-Received: by 2002:a17:907:3f07:: with SMTP id hq7mr15852256ejc.420.1636690514439; Thu, 11 Nov 2021 20:15:14 -0800 (PST)
MIME-Version: 1.0
References: <> <> <> <> <> <> <> <> <>
In-Reply-To: <>
From: Kris Zyp <>
Date: Thu, 11 Nov 2021 21:15:03 -0700
Message-ID: <>
To: Carsten Bormann <>
Cc: Christian Amsüss <>,
Content-Type: text/plain; charset="UTF-8"
Archived-At: <>
Subject: Re: [Cbor] Record proposal
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 12 Nov 2021 04:15:21 -0000

> Actually, stats would be very interesting.
> I was assuming that the 1+1 setup comes with a number of 1+2 referencing records, the hit from going to 1+2 there as well would be relatively insignificant.
> Number are better than assumptions!

You are definitely right, using 1+2 tag for defining records is pretty
insignificant (around a quarter of percent in my tests). Anyway, I put
together some tests comparing CBOR packed, record structures, and
combinations with a couple test data structures, with my library, for
the sake of further comparisons:

Anyway, seeing this, I am happy to go ahead and update my proposal to
use a 1+2 tag for defining records. And thinking about this, I don't
think my proposal necessarily even needs to mandate the tag ids used
for referencing records since those are dynamically assigned and
explicitly specified by the encoder itself (encoder obviously must not
conflict and use tag ids that will be used for other purposes), albeit
can encourage a certain range (presumably from the first-come
first-serve range).

Do you have any preference for a tag id to use? It looks like 279 is
the next in the contiguous block, but sounds like choosing aesthetic
characters is the new preference (29299/"rs" perhaps).

Anyway, thanks again for the helpful feedback, really appreciate it!