From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: I created a faster JSON parser Date: Tue, 19 Mar 2024 19:49:04 +0100 Message-ID: <05E839F0-736C-42C0-8344-1C8945E90289@gmail.com> References: <87a5n96mb5.fsf@gmail.com> <20240309203725.x456m7c6soxtgj6q@nullprogram.com> <86jzmawqbm.fsf@gnu.org> <87ttldydf2.fsf@posteo.net> <867ci8vqvl.fsf@gnu.org> <5396AC95-1D8F-4A89-B4A8-647B717A1E3C@gmail.com> <87r0ggdcki.fsf@gmail.com> <437D901F-CEC6-45E0-8ABE-B036A7B0AAF5@gmail.com> <87cyrv8vka.fsf@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9002"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?Q?Gerd_M=C3=B6llmann?= , Eli Zaretskii , Philip Kaludercic , wellons@nullprogram.com, emacs-devel@gnu.org To: =?utf-8?B?Ikhlcm1hbiwgR8OpemEi?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 19 19:49:51 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 1rmeX1-0002DO-F9 for ged-emacs-devel@m.gmane-mx.org; Tue, 19 Mar 2024 19:49:51 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmeWW-0003iv-DU; Tue, 19 Mar 2024 14:49:22 -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 1rmeWP-0003i4-7t for emacs-devel@gnu.org; Tue, 19 Mar 2024 14:49:13 -0400 Original-Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmeWM-0007LC-JH; Tue, 19 Mar 2024 14:49:12 -0400 Original-Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-513e25afabaso3399732e87.2; Tue, 19 Mar 2024 11:49:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710874146; x=1711478946; darn=gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=erWxUlJlcEXGyCvNfmzRag/0dSXHZrPTeCoVYWN1QL0=; b=RoOuPW7Klxv/7ToL73wlW6V+KdM/mvRSbokUDKBHJTEGnSNuBodMRUAn6a0SQqAEoN tNOrkeLCumQrLnHNYU8K9GGZN1KgpATwfQt5WIcWZQK7PviBvi4IQ/5dVDIu/Vrl/Vgm b49JxmTo/2BW46RZwjka7etrfFWrIej5AQsPWyJqdxGRoT4JZkMj9c1Aj837N6Ypcf9J twJWcGMNL9Pli3yZcSkUhI79dPTAzbc6m1qpYPBCrraQ7Yj7gxR8Hats9c178WVkYDNr DJCzv8Rldm4nP+pvrrct78+1rFrnhxqsv6Gr6kV5qsVOtStvaf8gzCbUnnsz85yoCbjd zeUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710874146; x=1711478946; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=erWxUlJlcEXGyCvNfmzRag/0dSXHZrPTeCoVYWN1QL0=; b=BIMAvZ90K4YZeKCIsqAVxnPk551tlCTvvAk1ZQ12UIvOWiegOFVrEJU/lWi5QweJrN sAmZMjHzrhdlQORS4mEEryhXD/fmPmee8hEW50XDaQCmpLcJk2MYFln92G5BEoZjrQWL 5SBFaJaY0SxVTxkpchl3QB1/CCPHDzEDLEALLhXjnrqSYOh7n/P+rAHLUOs69VXuOpP1 i6gdaOKXqiN0Hm25wyLz/TRbRxrGukGnLXWJDJnlq6ng6Fjp2DVBA2OpGQcMBW8n15Iu puTu+dDSmr3ryIghg4rOJW77zkJZfGCdSwJZxk9EqLI9dkfR4+HCxDYQf/+NF/8MZYlW vZVg== X-Forwarded-Encrypted: i=1; AJvYcCWyA/8gUefIkSh6t/55qLcePa4+BNFEyW+cXFAf4zfmvG0i30PBBshk5DjD8OSgS0g+BI4OlzrWZ3qBdTfmYo9n0DwjqjMvK1IWMaOFMHDVTO4= X-Gm-Message-State: AOJu0YwhFnac/lnzh8Pc6Rgfk3lI6MkWNwDTpGOqV3HChrUJ6+jHMR4/ DDJC+sxyQeDltELPU0px616NA6LPGYvA+Vk/g+IdY4G3ZZzfli9y X-Google-Smtp-Source: AGHT+IGkJtoNEsxSoarT2MeRCv2iumdPMO8b6p7ilEgDgRFgqse021ImEEVwQaDt/TMM8q86CAmiUA== X-Received: by 2002:a19:5e59:0:b0:513:b062:98c4 with SMTP id z25-20020a195e59000000b00513b06298c4mr9902995lfi.11.1710874146300; Tue, 19 Mar 2024 11:49:06 -0700 (PDT) Original-Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se. [80.217.1.132]) by smtp.gmail.com with ESMTPSA id c20-20020ac244b4000000b005158558022bsm165020lfm.288.2024.03.19.11.49.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Mar 2024 11:49:05 -0700 (PDT) In-Reply-To: <87cyrv8vka.fsf@gmail.com> X-Mailer: Apple Mail (2.3654.120.0.1.15) Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=mattias.engdegard@gmail.com; helo=mail-lf1-x135.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:317192 Archived-At: 15 mars 2024 kl. 14.35 skrev Herman, G=C3=A9za : > I implemented this idea, here is the latest version (now, = object_workspace is a Lisp_Object): That's considerably slower than before, especially for small inputs, so = it's probably a no-go. I definitely want to make Gerd's efforts no harder than necessary but = really don't think we should do pay the cost up-front like this. If = required for a better GC then fine, but let's do that work in the branch = for that effort instead of incurring overhead in Emacs now. > Is there anything that need to be done? It's probably a good idea to open a bug for this task, since it provides = a better and more focussed record of the discussion, with a single bug = number. Here are some remaining tasks: 1. Go back to the previous version which was much faster. 2. Don't allocate any temporary storage before you know that it's = actually necessary. 3. Stop using the object_workspace when not required, which is = everywhere except possibly when reading arrays into Lisp vectors. 4. Write a JSON serialiser.