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: [PATCH] Implement fast verisons of json-parse functions Date: Sun, 31 Mar 2024 16:51:34 +0200 Message-ID: <60B7A2FC-93BC-4759-91EE-DEE179009142@gmail.com> References: <87h6h2rsgn.fsf@gmail.com> <867chy3vpm.fsf@gnu.org> <87cyrqrqnb.fsf@gmail.com> <865xxi3tsu.fsf@gnu.org> <874jd2rnwj.fsf@gmail.com> <864jd14lqs.fsf@gnu.org> <87edc1rzig.fsf@gmail.com> <865xx4dv0g.fsf@gnu.org> <871q7snffr.fsf@gmail.com> <86plvbdgcx.fsf@gnu.org> <87wmpjmsie.fsf@gmail.com> <86zfufasz6.fsf@gnu.org> 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="30241"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?Q?G=C3=A9za_Herman?= , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 31 16:52:27 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 1rqwXr-0007cB-SF for ged-emacs-devel@m.gmane-mx.org; Sun, 31 Mar 2024 16:52:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqwX7-0008GA-Vm; Sun, 31 Mar 2024 10:51:42 -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 1rqwX6-0008Fi-Fg for emacs-devel@gnu.org; Sun, 31 Mar 2024 10:51:40 -0400 Original-Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rqwX4-00031d-S6; Sun, 31 Mar 2024 10:51:40 -0400 Original-Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-515d515e28dso1028270e87.0; Sun, 31 Mar 2024 07:51:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711896696; x=1712501496; 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=4PpOAnRJN4Wb32EtN0kpJbOaPhZjG9PrjdvYyjRtXV8=; b=XXTuReOjaMoYqi6NP/dZ8VzHDoNk5M8YPKoaf0XTP9UZ21ipb4LvQ5+5UllKSHVHJL h27YUlEu0EVzk1uOFHy34HCZ+dtoEPw6JF4qJGK14fKklJqTeAVzm8APV903ajaevQqW 8PgDh92WXOT2bRJ20Tf1g/JekDM5QfLHDCzrVXy6a/vFOQGUcXBm95FxjEwcJqQDJ9f3 fDpI2onUGsOV/SAvGhGLWIu9lYmStFVFlmj91BPezeLcHJ99HTFCNYy2l0oSetcTOZVu WwWWNDkG8XVdFi5mpGNlGPshDBg45ybRbFOqu3Z9rvfuH+aOszPte2aFO8Ssxp737YIt RVvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711896696; x=1712501496; 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=4PpOAnRJN4Wb32EtN0kpJbOaPhZjG9PrjdvYyjRtXV8=; b=MeEBcbPPZaUwn2cIsCwDPwmN85iZs7ZG6ig31RROfP383ege6IquezZBjhufLU3i3+ ooxHh11J9CYuvh9Nt8k1rNaRZdZm52CE/ynDmENG09BKY95i2JZsRBICrr+8qVFLlNhZ mXQdCouRF/VuX/PLsQpDgfqI5KO1k2YcKVYrEb+nnI6rwpdyu3GC84pSNxsLQv7kz9vS VGYcRlWSHUSnR1rxkGAIiPHAbNS/yIBA3Ou9I2xgaUtCzrzre+hx+M/sIp5atO0QoZrQ NY3dhkRQQESc7+86BwA/PXBukhhLtC6Q5Qr/1xFKWBc3j+JmsSwx9JVAFodqYDps+nsO yGPA== X-Forwarded-Encrypted: i=1; AJvYcCVykFAxzINcHiqnl+dVo7moAPxmK6KxtR5HFQNqnTG8Oa8JeG9iJIZPtQm+41SWJeMtoAec/149KvulRW6Zc3w3FIDx X-Gm-Message-State: AOJu0YwXmg5hhgj2Oh1eVy3cLbEFAvgF8gxHCM+wYejxH/xxJZRV1bdj bOzH7VhvofIcOvrbym888BKl4vJRYnjxrrxHOtT//+HBfunoK6sDiiSJCx1P X-Google-Smtp-Source: AGHT+IENZYakXX/zxX7RocI3c5sDnjfD4FrbNRJML4pjDGZHQfZrC2nN341gs78obh02CjZ3YwGStg== X-Received: by 2002:a05:6512:3257:b0:513:c17a:6cbf with SMTP id c23-20020a056512325700b00513c17a6cbfmr4221767lfr.47.1711896695955; Sun, 31 Mar 2024 07:51:35 -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 d15-20020a196b0f000000b005158a5e305dsm1157450lfa.165.2024.03.31.07.51.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 31 Mar 2024 07:51:35 -0700 (PDT) In-Reply-To: <86zfufasz6.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.120.0.1.15) Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=mattias.engdegard@gmail.com; helo=mail-lf1-x12f.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 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:317429 Archived-At: 31 mars 2024 kl. 07.08 skrev Eli Zaretskii : > Well, it's "kind-of" wrong argument: a string with embedded null > bytes. But I'm also interested to hear from Mattias on this (and from > anyone else who might have an opinion about the kind of error we > should signal in this case). I don't think users care much about the exact error we produce as long = as it's reasonably descriptive. It's only when user might reasonably = discriminate between different errors programmatically that it really = matters. We certainly shouldn't have a special message for NULs. I spent a slow morning speeding up the new JSON parser substantially by = not doing stupid work, and all UTF-8 decoding errors will now be = `json-utf8-decode-error` instead of `json-parse-error`. I think we can = live with that. The patch, which will be pushed shortly, also fixes a few long-standing = bugs, such as (json-parse-string "{\"=C3=A9\":1}" :object-type 'plist) which resulted in a mangled symbol name.