From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#31138: Native json slower than json.el Date: Mon, 22 Apr 2019 20:11:33 +0300 Message-ID: <5653b312-38ac-b8f5-1da4-a8f4c1ebe586@yandex.ru> References: <87sh806xwa.fsf@chapu.is> <83r2a2hdxn.fsf@gnu.org> <21f68973-a684-2a65-82eb-c8f3df90127f@yandex.ru> <83d0lmgez2.fsf@gnu.org> <7d503be9-4d85-3d0b-6829-631ad376ba3d@yandex.ru> <831s22gcci.fsf@gnu.org> <83y349gasn.fsf@gnu.org> <83d0lfag4x.fsf@gnu.org> <5cf45a21-65c3-67ee-f123-be83a6ee7c99@yandex.ru> <83a7gjaen6.fsf@gnu.org> <10ca4e2f-b116-16bc-c81e-24036752c867@yandex.ru> <83lg026xxb.fsf@gnu.org> <0d42dab4-6c5c-be3a-d402-f17b39e7fc3c@yandex.ru> <83k1fm6vly.fsf@gnu.org> <19b19dec-a5a0-e08d-6026-0b9621d38143@yandex.ru> <8336ma6oia.fsf@gnu.org> <83tveq56jr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="107288"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 Cc: p.stephani2@gmail.com, sebastien@chapu.is, yyoncho@gmail.com, 31138@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 22 19:21:09 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hIccv-000RnT-0L for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Apr 2019 19:21:09 +0200 Original-Received: from localhost ([127.0.0.1]:40369 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIcct-0001Y5-Sx for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Apr 2019 13:21:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIccd-0001QA-DC for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2019 13:20:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hIcU6-0002C4-T0 for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2019 13:12:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37952) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hIcU6-0002By-Pi for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2019 13:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hIcU6-0000Zm-Hf for bug-gnu-emacs@gnu.org; Mon, 22 Apr 2019 13:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Apr 2019 17:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31138 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 31138-submit@debbugs.gnu.org id=B31138.15559531052190 (code B ref 31138); Mon, 22 Apr 2019 17:12:02 +0000 Original-Received: (at 31138) by debbugs.gnu.org; 22 Apr 2019 17:11:45 +0000 Original-Received: from localhost ([127.0.0.1]:51496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hIcTp-0000ZD-5I for submit@debbugs.gnu.org; Mon, 22 Apr 2019 13:11:45 -0400 Original-Received: from mail-lj1-f196.google.com ([209.85.208.196]:45272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hIcTm-0000Ye-NQ for 31138@debbugs.gnu.org; Mon, 22 Apr 2019 13:11:43 -0400 Original-Received: by mail-lj1-f196.google.com with SMTP id y6so10891535ljd.12 for <31138@debbugs.gnu.org>; Mon, 22 Apr 2019 10:11:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=w3ykxEcVcrQ3WiQt9NqIakwY8egbvS9DbV0F59K4LtA=; b=UQNmwrOWBVR9CZ8ycpwm7qlMlAr6EH6NX/4Y+YO/HWW7pdHAQAL2lMT4+9p6dgi+IN RlL+KHFWPUGVZzM/GPFN4ZFy8PnHxMgKO9U5+20GlG3UnRc60eAN0KeEByaLRkegL4Ed oznZMkN6+TipUf0uT5zmGfk4QGY0bkS+/wmdjDkY6xYEOnK/YN50Pp1Fqb9ZEkyRa9oG Wiq1Ad7hpxN0+xt+g6+lypETv1CkhrjChYeBiOWk16WcrJiy97gt2D0J0WJHlsKYcLnT d91f4vSwxLX8R8HlcCvbS5LrhpV1+FdZjhK0QN/u+F5fdpDS0v97QyDqdhZvuqv/McSV 5bug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=w3ykxEcVcrQ3WiQt9NqIakwY8egbvS9DbV0F59K4LtA=; b=Srg2puFQ21aizwTBeM7FepV7D4T4miZ5lJteU3pVqrTM3REsisfL/LZ/fMi3emuYQw 6T9VdzS1SkgkQopjfpv5KgVrxG1qQ6kfuBSieucYLK0fo/aLH9KQBtTfypgs0Ui8vHUN l9A+JqdcwNm+Oshe0TPxstPYwhXT6AHn3xGmwih9PKmH/KJCWM03rqwo8kOkSvxKqN5u QVemvnb60R7dZqLQFsBcjtSHpuOFU+GJRHVf6HPpk8e3Zadr9f+wIfvtr3c/MO8XZLsL JZ4HlPHdtBwrmyxk8eJ12GQ7c7VFHD0aNWIm9k730fbiZMeUmQxMEdUWkLTo5KjAnKX0 deHQ== X-Gm-Message-State: APjAAAUPFPXr+6nxSZFvfRy6hkwRPXQpq4diHioISqo80fL5jLcCHRT5 2dFfjQ6w+ff9mU5wFJ5FMwM6hKIT X-Google-Smtp-Source: APXvYqzjYpPy5snCzKdV6Gu6vizrDa32ToWLFwzatWi2zNn2rrQ+Sn6kri99SuNlR0qyXKcyhoaNKA== X-Received: by 2002:a2e:42cf:: with SMTP id h76mr10831381ljf.95.1555953096476; Mon, 22 Apr 2019 10:11:36 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.174.23]) by smtp.googlemail.com with ESMTPSA id s64sm2810849lje.49.2019.04.22.10.11.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Apr 2019 10:11:35 -0700 (PDT) In-Reply-To: <83tveq56jr.fsf@gnu.org> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:158065 Archived-At: On 22.04.2019 19:49, Eli Zaretskii wrote: > Btw, we could somewhat speed up even the case where we do call > code_convert_string, by avoiding the call to make_specified_string. > That's because decode_coding_object, called by code_convert_string to > perform the decoding, is capable of decoding a C string, if we set up > its argument accordingly. Guess we could test that with a non-ascii sample. I was kind of expecting to continue on the "fast validation" route, and check whether DATA contains non-ASCII bytes in the exact way we want them. And simply abort otherwise. > You can see one example of that in > w32select.c:w32-get-clipboard-data. Hmm, I'm not seeing any calls to code_convert_string in w32select.c.