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: Sat, 16 Sep 2017 12:02:10 -0400 Message-ID: <87lgle3a4d.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 1505577855 26823 195.159.176.226 (16 Sep 2017 16:04:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 16 Sep 2017 16:04:15 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 16 18:04:10 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 1dtFZg-0006lp-5z for ged-emacs-devel@m.gmane.org; Sat, 16 Sep 2017 18:04:08 +0200 Original-Received: from localhost ([::1]:57854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtFZn-0006UW-8r for ged-emacs-devel@m.gmane.org; Sat, 16 Sep 2017 12:04:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtFXt-0005Xo-Td for emacs-devel@gnu.org; Sat, 16 Sep 2017 12:02:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtFXq-0000z9-Rg for emacs-devel@gnu.org; Sat, 16 Sep 2017 12:02:17 -0400 Original-Received: from mail-qk0-x229.google.com ([2607:f8b0:400d:c09::229]:49628) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dtFXq-0000yu-MN for emacs-devel@gnu.org; Sat, 16 Sep 2017 12:02:14 -0400 Original-Received: by mail-qk0-x229.google.com with SMTP id u67so4311994qkg.6 for ; Sat, 16 Sep 2017 09:02:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=zaGS/W/FWdmocAYr2BLhh4jAxHLlXx2rZS0ShVZnaxo=; b=RknxU10wI5huKetgE0P280nL7E1+4JxVnUFG5WcghwU1KOifZSsNKwL+Q5RVN6fjwe 0eRnR3eE6MMSutrj1OYUi71y1+lEc2lIYUGKJn4Nsa1//b3+oJL5MUkFOBGjMz169eUP imeOUg+R8McW0hlf1mw6dN9QL+PdklFUljALCX6LjeI43hoC2ZzHK8uY/+4RBQLLSHtE 8G4Azr/PK2W39W6QaCiOz/BVx43QGw/8aACL1nH7CTPWC34B4QBmkSWOiFNOp+ylLgpP 4nThDvVFqgufctN1FBxOuvhwcuSMfzajBnFzP65QHk83ULXc2jmX6fIxTcOj94WaQxNk RuTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=zaGS/W/FWdmocAYr2BLhh4jAxHLlXx2rZS0ShVZnaxo=; b=lRpaI4z08G6CQEL5zC8E/JNaDTBe89xQX3XbQFS7G17ZxJImMT2VImFhU+KDTsUAPA gvhDQfJ5/EvW1QW6qIBg/0KP2yYRKWdpZpgVIFrO1TofnMFDZtJ9rX88AA94ekKopI6k Zv9vHUplKxHryoE1e8UXSlaZxQb8F7bGqq11MV0XZRiR/ZFV8qu7ter51hC9t7I4b4uR LnlPKFyfM5FA+Cr0wgUHuH2Dg6hnAp+pLX5An0IFyKzZyGUGDjS7R7y+rXCJrjjnxJUC 1+BQsijajP9USpAhluIk/KwxR36raUT8qQqhB2dbslp4UACzYp1mT/9oZZlwr40l+Qi7 jHfg== X-Gm-Message-State: AHPjjUhiJFwh5JFF89PJsSpn3ZZbefGo5D3R1cNrlCCt+oZ5WGCEW+KY OIzNjtrdWX8pa4Z0/figww== X-Google-Smtp-Source: AOwi7QCpqY0GWdSQznyUgRdkKJ9KAM23zurVEMno/rDdLGc041Ya4Maq+AAd/cCDwGpVzCR+U7VbZQ== X-Received: by 10.55.164.67 with SMTP id n64mr13130573qke.328.1505577732572; Sat, 16 Sep 2017 09:02:12 -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 n88sm2311752qki.49.2017.09.16.09.02.11 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 16 Sep 2017 09:02:11 -0700 (PDT) Original-Received: by holos.localdomain (Postfix, from userid 1000) id 0C02C6A828; Sat, 16 Sep 2017 12:02:11 -0400 (EDT) In-Reply-To: <87poaqhc63.fsf@lifelogs.com> (Ted Zlatanov's message of "Sat, 16 Sep 2017 11:54:12 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::229 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:218368 Archived-At: Ted Zlatanov writes: > I wanted to ask if there's any chance of improving the parsing > performance of JSON, YAML, TOML, and similar data formats. It's pretty > poor today. > > That could be done in the core with C code, improved Lisp code, > integration with an external library, or a mix of those. There are a ton of external libraries for parsing JSON, many of which have lots of high level functions for dealing with it--at the cost of being forced to use their object system. I had a go at integrating jansson but had issues. I'm fond of this JSON tokenizer, alas AIUI we cannot use it without copyright assignment: https://github.com/zserge/jsmn I'm interested in JSON parsing in core, and to that end I'm learning Ragel to generate a parser. This could take a while, though :)