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.devel Subject: Re: Speedup of functions to en/decode UTF-8 text Date: Sat, 23 Nov 2019 20:42:09 +0200 Message-ID: <68de517e-8ba3-4bc5-985d-aeb894595658@yandex.ru> References: <83d0djue4q.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="54627"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: emacs-devel@gnu.org To: Eli Zaretskii , Ivan Yonchovski , =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 23 19:42:24 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iYaMR-000E7N-FA for ged-emacs-devel@m.gmane.org; Sat, 23 Nov 2019 19:42:23 +0100 Original-Received: from localhost ([::1]:60538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iYaMP-0007e0-Kp for ged-emacs-devel@m.gmane.org; Sat, 23 Nov 2019 13:42:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43859) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iYaMI-0007dh-MG for emacs-devel@gnu.org; Sat, 23 Nov 2019 13:42:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iYaMH-0001fe-N6 for emacs-devel@gnu.org; Sat, 23 Nov 2019 13:42:14 -0500 Original-Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:34625) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iYaMH-0001fD-H3; Sat, 23 Nov 2019 13:42:13 -0500 Original-Received: by mail-wm1-x334.google.com with SMTP id j18so12773096wmk.1; Sat, 23 Nov 2019 10:42:13 -0800 (PST) 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=N8dWDDZjmzKctsKNwVCWKbELLumLYy4gNbp3awoBPNA=; b=cdcCLhUwSwVWk6u+kWHee6PUiDKvtXXTC/SJYissGx4mcVbX+CRxvRdanLUTZLM4qf 7kJzuiedwF2KwthFeuM/zYsjo3kV6kVX0RzWwOuObilfo2TrUllz1vX/C2E44xgJjuVD BgNGO4mnDfTQ55o/wYvQeWd2lYqDJJhNTZo/SYJ2oB6Lv8Lr38owMFRylmcGXKErkLW4 abj6XIUbJPXUViidtJaKrm4NE0M4wBnUdAxBif/oER9yMijvn0AwZ4dfjcKCTRt9vX+a v/R+BI8euXRZeKKM8EmQP5q1COYBRujnDLlaGgctRBq1gQlckd4yE+VkyUX7KDAKjP+9 j/RQ== 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=N8dWDDZjmzKctsKNwVCWKbELLumLYy4gNbp3awoBPNA=; b=ctLonMV/6P1FLcMJLCK5tUeR9BErIva61ox33okovMPBIMyplMHAsTc+83SaiWueg7 epnYclQUddoIsNsnbzECyvjlr8lV2hoQlIVwqeWTConMin/3TO6JFZdPAVSNaibztF6i +O4A+K4CTgeHldmNrk19u3TojZm9FpN00aHfXRo+j+hbXuqDDUJkw0v54wLyaoTeT7Et A9GmKlo1pN01YfxAl5rsJv0kJLAeFRx1z4X/uC7p6eyrFFKXJkugjppot7MXseltoNR9 0rjj33YD+Pkk5Dj4mfdu+ZR4aL5GljBt37mbhzYVx9hi9C7BGCFOl199w633BjlKhR9V BWhA== X-Gm-Message-State: APjAAAX7Qrcb5f+9bIIXY0i+6X+ySahzpUCxG384pcDnZN+FIX5BPwvm HQebQEuXe72DKxOvWLwsb+8g7sNy X-Google-Smtp-Source: APXvYqwvfBQeBCX1UT7ZfVcshpXlDUNBNxvfvPYhNF3lfFPUoAGLDB/BLyY5ATEMKfC9kSkSKobSlw== X-Received: by 2002:a1c:808d:: with SMTP id b135mr21321159wmd.175.1574534531990; Sat, 23 Nov 2019 10:42:11 -0800 (PST) Original-Received: from [192.168.0.5] ([212.50.117.215]) by smtp.googlemail.com with ESMTPSA id m9sm2973240wro.66.2019.11.23.10.42.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Nov 2019 10:42:11 -0800 (PST) In-Reply-To: <83d0djue4q.fsf@gnu.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::334 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:242657 Archived-At: On 23.11.2019 11:37, Eli Zaretskii wrote: > I've made some changes in the functions that encode and decode UTF-8 > text in an optimized fashion. This is expected to speed up JSON > handling. Some preliminary benchmarking of the decoding function > indicates speed improvements starting at modest 30-40%, and sometimes > much higher -- tenfold or more. I'm not sure how this will fare in > the real-life handling of JSON objects This is great. But were those 30-40% improvements in tests with strings or JSON decoding? I tested two old examples, and the difference is <10% (like 0.78s down to 0.73s in the best case). Which is still welcome, of course.