From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: JSON/YAML/TOML/etc. parsing performance Date: Mon, 18 Sep 2017 14:14:13 +0000 Message-ID: References: <87poaqhc63.fsf@lifelogs.com> <87efr4jeh3.fsf@udel.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113cddce0d401d0559775c57" X-Trace: blaine.gmane.org 1505744411 14343 195.159.176.226 (18 Sep 2017 14:20:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 18 Sep 2017 14:20:11 +0000 (UTC) Cc: emacs-devel@gnu.org To: Mark Oteiza Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 18 16:20:01 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dtwtz-0003EH-9h for ged-emacs-devel@m.gmane.org; Mon, 18 Sep 2017 16:19:59 +0200 Original-Received: from localhost ([::1]:36914 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtwu6-0001be-Jt for ged-emacs-devel@m.gmane.org; Mon, 18 Sep 2017 10:20:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtwof-0006GY-43 for emacs-devel@gnu.org; Mon, 18 Sep 2017 10:14:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtwoa-0001Jz-V8 for emacs-devel@gnu.org; Mon, 18 Sep 2017 10:14:29 -0400 Original-Received: from mail-io0-x234.google.com ([2607:f8b0:4001:c06::234]:54913) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dtwoa-0001Jk-Q2 for emacs-devel@gnu.org; Mon, 18 Sep 2017 10:14:24 -0400 Original-Received: by mail-io0-x234.google.com with SMTP id h66so2364729ioh.11 for ; Mon, 18 Sep 2017 07:14:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I/i/0osJ71i8wkbQx8GP8duA5IECzujE1KiUyDNjH7A=; b=HvnFRzXkZSCm035Bnv/5YM88XyzoTgLVIviaQ9zc8ZEbh6ZF0HrPNUqMx+dFJhsyIy p84d7T5n9N1pMDySTWfGlSHTuzFUf33aQvDdXJ5fKnYauKD7UrT9s5Pr5iMcNXk/KHcv P+HjDGBSfNa5Q64lbf8LX4zFc8H42gmfKrwImsEWfsY4MdCwsDOCkQ3xpCxI0z1D+J0e uyT0O5pYLlnXwNYY1j5boeLp1dgMS31Gk0FINuKoI6/B2JZj7p7Ph00FHBAng1aPOvRj F1bLVaJQ/lAeXlmozGUcpgEmlwG1kTQeJl9LiuG3a5GRR/4Pv9Qd+1YwybI9nk7ALJz6 yciw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I/i/0osJ71i8wkbQx8GP8duA5IECzujE1KiUyDNjH7A=; b=AryXIu9uyjQrjt+YyHB9KXJ38q/V6/L50l1d4rsSAie+hXsgYlVBOUdhzsgLidjHLk my9oGX7BP4FxiuzipOqbhSY/mVV4CGUwAizce1WSiE7fUq5YLMyvL5JsFId+mjq9PYdM cUCC2J1ck2a47CKD8MQbALBwbVOYrpTJhZ7mX4fkVG7dFih2nDIHzs0/e0JKWcHbqFsQ 5LtMzKsKBCKcpjJXy4s9JWHZZpZBgusCoXRVk5eBhRzu5OSawcO/eAciTEwFI42gRziT u3l58f/iys8Ph19txAxQMrkK6gp+GdbSGtY/B8sLq3fZzvN/0H0CMc9l1vyVxAv9KQeS wsug== X-Gm-Message-State: AHPjjUgN6TpYtHKa0XFkWUsYWGw7faeRype5LkM9dMzpHToDiKw4NMUY N9Hle0/Qw/WJ6aiVOlalFvhBdqUxxFPsa7b16fg= X-Google-Smtp-Source: AOwi7QCMUi5E9kQVSXBfmlUeKlxxuaccoUPRV1N+HIVfXVqSy/4+VBPffeMDwivJKm5ENLMp/fJNoopv8lptG1RuaCE= X-Received: by 10.202.177.195 with SMTP id a186mr21893380oif.32.1505744063900; Mon, 18 Sep 2017 07:14:23 -0700 (PDT) In-Reply-To: <87efr4jeh3.fsf@udel.edu> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c06::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:218460 Archived-At: --001a113cddce0d401d0559775c57 Content-Type: text/plain; charset="UTF-8" Mark Oteiza schrieb am Mo., 18. Sep. 2017 um 15:58 Uhr: > Was there a particular reason (aside from access time) you chose > hash tables instead of a sexp form? > - Hashtables have similar constraints as the underlying JSON objects (no duplicate keys, no ordering), so they are a better match. - Hashtables have non-nil empty values. If I had uses alists, I would have had to introduce a separate keyword :json-null for null. - Hashtables always represent maps, but alists are also normal sequences, so users could expect that they get translated into arrays instead of objects. - Using only one data structure per JSON object type makes the interface and implementation simpler. --001a113cddce0d401d0559775c57 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Mark O= teiza <mvoteiza@udel.edu> sc= hrieb am Mo., 18. Sep. 2017 um 15:58=C2=A0Uhr:
Was there a particular reason (aside from access time) you ch= ose
hash tables instead of a sexp form?

- H= ashtables have similar constraints as the underlying JSON objects (no dupli= cate keys, no ordering), so they are a better match.
- Hashtables= have non-nil empty values. If I had uses alists, I would have had to intro= duce a separate keyword :json-null for null.
- Hashtables always = represent maps, but alists are also normal sequences, so users could expect= that they get translated into arrays instead of objects.
- Using= only one data structure per JSON object type makes the interface and imple= mentation simpler.
--001a113cddce0d401d0559775c57--