From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: I created a faster JSON parser Date: Sun, 10 Mar 2024 21:39:29 +0000 Message-ID: <87ttldydf2.fsf@posteo.net> References: <87a5n96mb5.fsf@gmail.com> <20240309203725.x456m7c6soxtgj6q@nullprogram.com> <86jzmawqbm.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35653"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Christopher Wellons , geza.herman@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 10 22:40:24 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rjQu8-00095w-E9 for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Mar 2024 22:40:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rjQtK-0000Ct-Uo; Sun, 10 Mar 2024 17:39:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rjQtJ-0000Cd-Su for emacs-devel@gnu.org; Sun, 10 Mar 2024 17:39:33 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rjQtI-0007gM-5c for emacs-devel@gnu.org; Sun, 10 Mar 2024 17:39:33 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id EAA6324002A for ; Sun, 10 Mar 2024 22:39:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1710106770; bh=BeLNAaAL7eLnUNO4fQlzESzq1bOAYSpL8QjqEDSPIvs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=UVqfueBNSjKJiE0LjFNNCz444VoUi/GlyNQSEifqr478oFBo77ShFWsz24hek8pds v0yvSZDfUmTSaoa0Plxh9w7gkDmgPTSPWRcRjelXKsmQPpHTtiq0j0ow6Xr8WIvzTU X4XMHLRwteRTDcxNJ5x1N9bz40nFW6sIyyhwqJIOgLUc7gZwH+oP7GEg3OpJ2BtLW3 2lX+9CTv4H1kk1SJvjZkhl8XoOz/GXu8Jl1EgiqnUCXq4D/5i3dQt6rpCZgTXBMEk/ Pvhd+nLo6Rd7mKYNjT52YV7uDxcDcIA1IIPXyTGm31dFQk6fTGccQV4mATPkA0Inei EMhDIlC/AlcmA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TtCwd3632z6twh; Sun, 10 Mar 2024 22:39:29 +0100 (CET) In-Reply-To: <86jzmawqbm.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 10 Mar 2024 08:31:25 +0200") X-Hashcash: 1:20:240310:geza.herman@gmail.com::FfoHqs4RMUjb+4sU:Oen X-Hashcash: 1:20:240310:wellons@nullprogram.com::3kgHtbKWF+qFwX2w:7DW X-Hashcash: 1:20:240310:emacs-devel@gnu.org::r7Sf6boD7LTksgJa:1aW4 X-Hashcash: 1:20:240310:eliz@gnu.org::TVTSoG7qdvccbImJ:A3Zc Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316988 Archived-At: Eli Zaretskii writes: >> Date: Sat, 9 Mar 2024 15:37:25 -0500 >> From: Christopher Wellons >> Cc: "emacs-devel@gnu.org" >> >> Despite the obvious care which with this was written, I personally would >> not adopt a JSON parser that had not been thoroughly fuzz tested under >> Address Sanitizer and Undefined Behavior Sanitizer. Fuzzing is incredibly >> effective at finding defects, and it would be foolish not to use it in its >> ideal circumstances. Normally it's not difficult and requires only a few >> lines of code. But this JSON parser is tightly coupled with the Emacs Lisp >> runtime, which greatly complicates things. I couldn't simply pluck it out >> by itself and drop it in, say, AFL++. > > That's okay, we can start by making this an optional feature, and > consider making it the default after a couple of major releases; > meanwhile, any problems will be detected and reported. > > However, it would make much more sense to consider switching to this > code if it also could handle producing JSON output, thus making > libjansson unnecessary when we decide to switch. If libjansson is not available, it should still be possible to use this faster parser, while falling back to json.el for generating JSON? From what I understand, the main issue people have with JSON is the parsing bottleneck, right? -- Philip Kaludercic on icterid