From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: JSON/YAML/TOML/etc. parsing performance Date: Sun, 08 Oct 2017 22:52:36 +0000 Message-ID: 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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a1141a45cc65e40055b10ee41" X-Trace: blaine.gmane.org 1507503211 30513 195.159.176.226 (8 Oct 2017 22:53:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 8 Oct 2017 22:53:31 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 09 00:53: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 1e1KRm-0006oN-2i for ged-emacs-devel@m.gmane.org; Mon, 09 Oct 2017 00:53:22 +0200 Original-Received: from localhost ([::1]:55351 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1KRt-0005om-HY for ged-emacs-devel@m.gmane.org; Sun, 08 Oct 2017 18:53:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1KRG-0005oW-Gv for emacs-devel@gnu.org; Sun, 08 Oct 2017 18:52:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1KRF-0004ka-SB for emacs-devel@gnu.org; Sun, 08 Oct 2017 18:52:50 -0400 Original-Received: from mail-oi0-x231.google.com ([2607:f8b0:4003:c06::231]:54860) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e1KRE-0004jW-63; Sun, 08 Oct 2017 18:52:48 -0400 Original-Received: by mail-oi0-x231.google.com with SMTP id u130so36941756oib.11; Sun, 08 Oct 2017 15:52:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9qaBqLKFXNKGQ256kBaitSpsnyV8cUWU3tEe4tVmRMI=; b=cZ7GghtagkNCY/N0JS5oRHdOQ14yM9iL8TnejgyJytAJPEdmgS0bZRi8mc69PIqSc4 qmyilcD4G5ohEVbjG5QzV7CT340meMAivIGKPC4XZYHzSay6IdP0GnogD13EP7OUgJbf 1mvPp7u2hruVbIH+B6r0vu+MUbRNxkivXZVsMiaPK27i1T0BBkNH8sifI4D2I15TN7yL NJDaxiLd/tX5Ap3Sxh8SmUdyAUD6BglnvKZNvladQuqnHDk6azpxCGritue8/PZ7axio nQ2kDPvV1HP0Dr2x4S0clB7tLVjRfKcKN10bTEitrTI8DcTAreJR24T+nILu9FWP848F /Wqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9qaBqLKFXNKGQ256kBaitSpsnyV8cUWU3tEe4tVmRMI=; b=h806lSIlzC2kgUAFyhGr4hyOn1524LgD10GoANldfQ0az4uifPvQcqeLKJKM11aVgA KtG3U52/0GcJ4avTBX2fNihMK+/iRijWwEaZhzRv819R8v8ivz0jlrchPp0iYDu/EW30 8/PMhVRQrN9QvBFKFMg0ZDAsKKvjMC75ucvN2CtI8MJoFb8YZ+YKZNmM0m8SOkRVObpa Cg4bwVDG5BOTQjx7YJOJ66dqfTntPREa4UDSUfp/9ApoI+fOMMj9Js/FlK7gUJUXItFi DHAa52ghROz+cLD6ZB0I2oG9sWb+FIqwrHbl4S5PZEry0V4lKw9l9llG0XUfK97130E+ dY4g== X-Gm-Message-State: AMCzsaXZsDTaBCBfQfCK3x3JrHfSUuvXHez9ERnMpMSGKZ582JZSt2VG bbwUTD3uyLKAkkYlABGFpHqSW9LMzhDTP0EB+Yc= X-Google-Smtp-Source: AOwi7QBwz72Tn2Q9aspatQeGk4xRuhnvZ+hKORkP+F+nw9iwSVS5dHcIOTJXKFgKLbvfxAGXeqLFQPQS2vZ4eaApptc= X-Received: by 10.202.229.5 with SMTP id c5mr4369723oih.82.1507503167133; Sun, 08 Oct 2017 15:52:47 -0700 (PDT) In-Reply-To: <8c922c27-9de0-7d99-6c26-a94a0387c45e@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::231 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:219275 Archived-At: --001a1141a45cc65e40055b10ee41 Content-Type: text/plain; charset="UTF-8" Paul Eggert schrieb am Do., 5. Okt. 2017 um 03:48 Uhr: > > 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. > > I don't understand why minimizing the number of checks and assertions should be a worthwhile goal. At the very least, the assertions document the assumptions that we make about the values, and as such they are valuable even if they never trigger. --001a1141a45cc65e40055b10ee41 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Paul E= ggert <eggert@cs.ucla.edu> = schrieb am Do., 5. Okt. 2017 um 03:48=C2=A0Uhr:

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.


I don't understand why minimizing = the number of checks and assertions should be a worthwhile goal. At the ver= y least, the assertions document the assumptions that we make about the val= ues, and as such they are valuable even if they never trigger.=C2=A0
<= /div>
--001a1141a45cc65e40055b10ee41--