From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Implement fast verisons of json-parse functions Date: Wed, 20 Mar 2024 05:37:15 +0200 Message-ID: <864jd14lqs.fsf@gnu.org> References: <87h6h2rsgn.fsf@gmail.com> <867chy3vpm.fsf@gnu.org> <87cyrqrqnb.fsf@gmail.com> <865xxi3tsu.fsf@gnu.org> <874jd2rnwj.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36952"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?utf-8?Q?G=C3=A9za_Herman?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 20 04:38:14 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 1rmmmL-0009Ss-Kw for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Mar 2024 04:38:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmmlT-00058I-5K; Tue, 19 Mar 2024 23:37:19 -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 1rmmlR-000589-1s for emacs-devel@gnu.org; Tue, 19 Mar 2024 23:37:17 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmmlQ-0002Av-P5; Tue, 19 Mar 2024 23:37:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=5awu8ccY6lXodytcNFU3H/aEmAfCuCeplNExjtHcs/k=; b=HmS7manMJme4DiXWTx/w qRf1IKjMkdQqlu/qkxSOdzY7+ARhCRILv7jclLoMEiKX213sDRDKMSpgsyJy5uOOV6puKM/pW+smj fHwRo2I0rdmOgsTZetcxcuY5+doFH+IKEqXTYOj6wqCWetuQ01O3iaER3zIVrPfVvEQ80cv/aVUFX zs4hYwTx1EZ/TcF9/hcmheg1FN9/PAaAIemy2adDilAFI2a7HE23RAJVTTsdnRxhhYqKHgwXWTjYN pMYw6feH9ldJDpDbszLBOSnpaX7fiNTPZPdbc9kHFjl32GIe7UuXfRGPxrgw4ICHDaDaclSgly+EX wtWxCk5n4/aIDQ==; In-Reply-To: <874jd2rnwj.fsf@gmail.com> (message from Herman, =?utf-8?Q?G?= =?utf-8?Q?=C3=A9za?= on Tue, 19 Mar 2024 20:50:48 +0100) 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:317207 Archived-At: > From: Herman, Géza > Cc: Géza Herman , > emacs-devel@gnu.org > Date: Tue, 19 Mar 2024 20:50:48 +0100 > > > Eli Zaretskii writes: > > > An optional feature I had in mind was conditional compilation, > > so that > > users should decide at build time which version they want. But > > the > > names and signatures of the functions exposed to Lisp should be > > the > > same in both cases, so that Lisp programmers don't need to > > change > > their programs to cater to both alternatives. > > > > Apologies if what I wrote was not clear enough about that. For > > the > > future, I suggest that we discuss the practical implication of > > significant changes before you go ahead and invest many hours in > > implementing and testing them. I would like to avoid situations > > where > > you invest significant efforts based on misunderstandings. > > Thank you for the great attitude! No worries, it only took ~10 > minutes to create that version. And even if we don't want to have > that approach, it can still be useful for validation (comparing > the parsing results of the original and new parser) and > benchmarking purposes. > > If we want to have conditional compilation, is there a simple > similar conditional compilation case already in Emacs? So I can > copy the approach easily (supposedly I need to add a flag to > configure, it needs to add a -DUSE_OWN_JSON_PARSER switch to the > compiller, etc.) Let's wait with this until we have a clear idea whether we need this. My suggestion was just to present a possibility, not necessarily a decision that we should have this. I'm not sure yet whether we need to offer the possibility of using libjansson for parsing JSON as an option.