From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: JSON/YAML/TOML/etc. parsing performance Date: Thu, 05 Oct 2017 10:14:38 +0300 Message-ID: <83k20axe01.fsf@gnu.org> References: <87poaqhc63.fsf@lifelogs.com> <8360ceh5f1.fsf@gnu.org> <83h8vl5lf9.fsf@gnu.org> <83r2um3fqi.fsf@gnu.org> <43520b71-9e25-926c-d744-78098dad6441@cs.ucla.edu> <83o9pnzddc.fsf@gnu.org> <472176ce-846b-1f24-716b-98eb95ceaa47@cs.ucla.edu> <83d163z6dy.fsf@gnu.org> <73477c99-1600-a53d-d84f-737837d0f91f@cs.ucla.edu> <83poa2ya8j.fsf@gnu.org> <21b0ba97-ed49-43ae-e86f-63fba762353a@cs.ucla.edu> <8c922c27-9de0-7d99-6c26-a94a0387c45e@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1507187731 14770 195.159.176.226 (5 Oct 2017 07:15:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 5 Oct 2017 07:15:31 +0000 (UTC) Cc: p.stephani2@gmail.com, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 05 09:15:25 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 1e00NN-0002jx-Se for ged-emacs-devel@m.gmane.org; Thu, 05 Oct 2017 09:15:22 +0200 Original-Received: from localhost ([::1]:38099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e00NV-00035M-CX for ged-emacs-devel@m.gmane.org; Thu, 05 Oct 2017 03:15:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e00Mw-00033p-8Y for emacs-devel@gnu.org; Thu, 05 Oct 2017 03:14:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e00Ms-0000EL-Am for emacs-devel@gnu.org; Thu, 05 Oct 2017 03:14:54 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44085) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e00Ms-0000EG-6r; Thu, 05 Oct 2017 03:14:50 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2593 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e00Mr-00061L-J3; Thu, 05 Oct 2017 03:14:50 -0400 In-reply-to: <8c922c27-9de0-7d99-6c26-a94a0387c45e@cs.ucla.edu> (message from Paul Eggert on Wed, 4 Oct 2017 18:48:04 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:219111 Archived-At: > From: Paul Eggert > Cc: p.stephani2@gmail.com, emacs-devel@gnu.org > Date: Wed, 4 Oct 2017 18:48:04 -0700 > > Sorry, I looked only at this month's part of the thead. When I went back > to last month's I found this: > > http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg01080.html > > for which I suggest the attached as a simplification. One idea here is > that there is no need for eassert (E) unless there's a genuine doubt > that E will be true (in some cases the removed eassert (E) calls were > ineffective anyway, due to preceding eassume (E) calls). The patch cuts > down the number of integer overflow checks to six in json.c, if I'm > counting correctly, and that should be good enough. Thanks. This is indeed good progress. However, I think we could make even more progress by changing some of our primitives to accept size_t arguments. See my other message for the details.