From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark Oteiza Newsgroups: gmane.emacs.devel Subject: Re: JSON/YAML/TOML/etc. parsing performance Date: Mon, 18 Sep 2017 09:58:16 -0400 Message-ID: <87efr4jeh3.fsf@udel.edu> References: <87poaqhc63.fsf@lifelogs.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1505743225 26760 195.159.176.226 (18 Sep 2017 14:00:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 18 Sep 2017 14:00:25 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) Cc: emacs-devel@gnu.org To: Philipp Stephani Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 18 16:00:18 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 1dtwat-0006cE-LG for ged-emacs-devel@m.gmane.org; Mon, 18 Sep 2017 16:00:15 +0200 Original-Received: from localhost ([::1]:36787 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtwb0-00029Y-QP for ged-emacs-devel@m.gmane.org; Mon, 18 Sep 2017 10:00:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37703) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtwZ7-0000h6-Ia for emacs-devel@gnu.org; Mon, 18 Sep 2017 09:58:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtwZ3-0000dZ-NX for emacs-devel@gnu.org; Mon, 18 Sep 2017 09:58:25 -0400 Original-Received: from mail-qk0-x22d.google.com ([2607:f8b0:400d:c09::22d]:52221) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dtwZ3-0000bf-IB for emacs-devel@gnu.org; Mon, 18 Sep 2017 09:58:21 -0400 Original-Received: by mail-qk0-x22d.google.com with SMTP id c69so570573qke.8 for ; Mon, 18 Sep 2017 06:58:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=2PM4d3fLvrGnY+fttHzczD4fhSIY535m2uMNNArywlQ=; b=winkRtUJjMV7Lfxghccy71AUYycOIpLG4K8KubNVfK+MgI2tZ5bpzPAbTNot/IMqfb hzfvTGjoNJhe5/nltcb54jUgemxt9eYvohJHj2IOgzis5quKQxP2SvSAcGW2drVoBSNO CAj1j1TTYMX/d0ICAUju+6ZCOvVZrtNbm9tLCyODp7pz6Fn0PMhpku40HgPYWqdn8lHY gZZGHZRIHj3Jzuojc9UBoRRE/rfVtLO3Lz6Mbz3NObAe3gYDD5cdITrl2im93ENxALg4 Qoi6DFlZ1zHDBlFYO8+eQmHNZQS81Fb9prGxZvWHVdBtN4ycMTOCiIXX1doqoCjYI7hq T6Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=2PM4d3fLvrGnY+fttHzczD4fhSIY535m2uMNNArywlQ=; b=iwMdO3PeRUS4QYAY+HYhNYL5MNsrXXKWaDQCNHt1snXFdF1Wj8SSdNRH8qYw6O3dEr pF2JNN0fUQQRXhfgWX2eRWt7EHFeIGGNRQ7+1Sy/ODJAEkcFjMrdNxYndWJLKmgqQ6IJ zOIo7WdutkzD6g/lhPooocs5sGWQkG9ohJlIg0wLoHnGO3q2/5d+Krfj0HF5C1iI0oL/ o0IO+v/dJaR5v8fHwtlbD/cUZB8hUfgG3BTsH6KtDddPVb5Lj4Xln3GGsq/iOsUEmf0g CakuzifgCyQAvihhpgkZGE8ZesRe3p3r4+8fq9OQGrzLw02l50rT3Il46qVutUAs+Zax m1aw== X-Gm-Message-State: AHPjjUhV1LP9hTsqkrpClzDrUJgh1HB7nwfoJfAmN4k0EOTBR43AhV3p g8bUDz1WcavHEx8s X-Google-Smtp-Source: AOwi7QDZQXUdqLA/VAp6X5oGttBYn9RGbCbiwfQOtAYzl8x4iWb5WloFDJonMzkBerIpjng73eDNdQ== X-Received: by 10.233.235.17 with SMTP id b17mr18858336qkg.254.1505743099184; Mon, 18 Sep 2017 06:58:19 -0700 (PDT) Original-Received: from holos.localdomain (pool-173-67-36-61.bltmmd.fios.verizon.net. [173.67.36.61]) by smtp.gmail.com with ESMTPSA id v11sm5210735qti.95.2017.09.18.06.58.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Sep 2017 06:58:17 -0700 (PDT) Original-Received: by holos.localdomain (Postfix, from userid 1000) id 4CE1969594; Mon, 18 Sep 2017 09:58:16 -0400 (EDT) In-Reply-To: (Philipp Stephani's message of "Mon, 18 Sep 2017 13:26:34 +0000") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::22d 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:218459 Archived-At: > Philipp Stephani schrieb am So., 17. Sep. 2017 um 20:46 Uhr: > > I've discovered that the interface and documentation of Jansson are much better than > the ones of json-c, so I switched to Jansson. I've attached a patch. Doing the following on a 276K file: (with-temp-buffer (insert-file-contents-literally "test.json") (benchmark-run 10 (goto-char (point-min)) (json-parse-buffer))) These are my rough average benchmarks: Time GCs GC time Jansson 0.33 10 0.15 json.el 1.21 38 0.48 Nice. Was there a particular reason (aside from access time) you chose hash tables instead of a sexp form?