From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: JSON/YAML/TOML/etc. parsing performance Date: Mon, 18 Sep 2017 09:53:23 -0400 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87y3pcf6zw.fsf@lifelogs.com> References: <87poaqhc63.fsf@lifelogs.com> <83vakhi1rx.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1505742889 6633 195.159.176.226 (18 Sep 2017 13:54:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 18 Sep 2017 13:54:49 +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 Mon Sep 18 15:54:44 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 1dtwVY-0001UX-Aa for ged-emacs-devel@m.gmane.org; Mon, 18 Sep 2017 15:54:44 +0200 Original-Received: from localhost ([::1]:36743 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtwVf-0006id-O4 for ged-emacs-devel@m.gmane.org; Mon, 18 Sep 2017 09:54:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtwUR-00066P-R4 for emacs-devel@gnu.org; Mon, 18 Sep 2017 09:53:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtwUN-00066S-WA for emacs-devel@gnu.org; Mon, 18 Sep 2017 09:53:35 -0400 Original-Received: from [195.159.176.226] (port=41015 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dtwUN-00065U-Pg for emacs-devel@gnu.org; Mon, 18 Sep 2017 09:53:31 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dtwUD-0006R4-DA for emacs-devel@gnu.org; Mon, 18 Sep 2017 15:53:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 30 Original-X-Complaints-To: usenet@blaine.gmane.org X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never Cancel-Lock: sha1:LKsR2PeWtOV4VrdxEwNLu93+FZ8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:218458 Archived-At: On Sun, 17 Sep 2017 20:27:02 +0000 Philipp Stephani wrote: PS> Sure, I've made a quick overview based on PS> https://github.com/miloyip/nativejson-benchmark. I've only used the PS> libraries that are written in C and have been tested in that benchmark; PS> it's still quite a few. I've checked the conformance and speed metrics from PS> the benchmark as well as number of GitHub stars (as proxy for popularity) PS> and number of commit in the last month (as proxy for development activity): PS> Here are the results: PS> https://docs.google.com/spreadsheets/d/e/2PACX-1vTqKxqo47s67L3EJ9AWvZclNuT2xbd9rgoRuJ_UYbXgnV171owr8h2mksHjrjNGADDR3DVTWQvUMBpe/pubhtml?gid=0&single=true PS> Note that some of the libraries (jsmn, ujson4c) don't appear to support PS> serialization at all; I'd suggest to avoid them, because we'd then need to PS> wrap another library for serialization. Also, even though JSMN advertises PS> itself as "world's fastest JSON parser", it's actually the slowest of the PS> libraries in the survey. json-c appears to be reasonably conformant and PS> fast for both parsing and serialization, and has by far the largest PS> development activity. Hi Philipp, thanks for doing all that work! I'd suggest posting the survey results here directly. Also maybe consider the jq built-in JSON parser, which could be a good fit (it's usable as a library IIRC). The rest of the libraries look good and I hope we make a choice soon. I don't have a favorite. Thanks Ted