From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74476: [PATCH] Explore JPEG loading without quantization Date: Sat, 30 Nov 2024 19:49:41 +0100 Message-ID: <874j3oblq2.fsf@ledu-giraud.fr> References: <871pz39v6p.fsf@ledu-giraud.fr> <86iks581nf.fsf@gnu.org> <87y11093gx.fsf@ledu-giraud.fr> <87h67obpn6.fsf@ledu-giraud.fr> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34984"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 74476@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 30 19:50:31 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1tHSY2-0008wQ-Sj for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Nov 2024 19:50:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tHSXc-0006oh-Qr; Sat, 30 Nov 2024 13:50:05 -0500 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 1tHSXa-0006mx-Pd for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 13:50:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tHSXa-0006xT-Ew for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 13:50:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=sLM5E9TsnuLYT2ChJXK570FmynG7lD8jRuEZnsEyiU0=; b=gkXOsT/Wy1ueZJWqUdFh6Pe4D6vQopTx8mzcs6cQf/fm4Tk0NVo9u94xZUYu+TRMVhmrRf6m5wOSRS352KJn+CzxJ87Nc6pi838xdvkulxgDTIHqUek/enlN4yvce2gfOP0VNPA+ScJlP9Hm6n0d9/XzENY0vDg0pzNk2f4Wwby0yMOIjDOOoyA6x2xZQr2LSlU0n9LD4j68MpfA7G92/hH7nwlfOFoa8gsAFuVP15o7D2PFJl+bFroyyUiDm34HpXXKOpYRyIb/w/cny6VXnsV5R1k2JAGpXbhAxMrObHqEZOGcLB4yvqSidWIX82JruRqepL9fS3bLwEfvXWi4ww==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tHSXa-00029Z-0h for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 13:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Nov 2024 18:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74476 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74476-submit@debbugs.gnu.org id=B74476.17329925868224 (code B ref 74476); Sat, 30 Nov 2024 18:50:01 +0000 Original-Received: (at 74476) by debbugs.gnu.org; 30 Nov 2024 18:49:46 +0000 Original-Received: from localhost ([127.0.0.1]:49039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHSXK-00028Z-BK for submit@debbugs.gnu.org; Sat, 30 Nov 2024 13:49:46 -0500 Original-Received: from ledu-giraud.fr ([51.159.28.247]:11351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHSXH-00028M-S0 for 74476@debbugs.gnu.org; Sat, 30 Nov 2024 13:49:45 -0500 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=3d488gTw no5NzvPPLZ57nQRc5okoOPYaO7ZvLOFFt2M=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=A+CAo72xhZPySzMAn0at1G9N9UocKn 2wtgWeWnnEP5IKPqVVFWL9u8W/Z6AfAnUQpYh7q01Ga2iQzMoTdus9AQ== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=3d488gTwno5NzvPP LZ57nQRc5okoOPYaO7ZvLOFFt2M=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=gm44WKog6+saeTpeYz+iuu1GPrdUXzHDQIIUYf lbqCQ1Oyue184JtUCToX3AATJA30DTNwVLLmARAXDeeSBO3MFmzzeA6XDeg5x+LgSHwN0X zlNueNkbW0p9xkEGISGzxphmjS+e7R7t6/jUleNkzzDtg/o20EM9JiD8b5KAH4jUxYbEYU BnbMQfW1hqtazhsmD4Ki8O+UCLa3slfyCrTFRyH1Uqep9LtDMnn16yRtuIhzA5GLO+BLd4 9egJd5GUdy1tu+2bQbIJp59YJQFCWeW90nX6Mkv91akiuoFTFypCozqiv07b+YJF7P/ZxO VdHyXGTQmCcRQfMrH5JvKIIQ== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id ff571333 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 30 Nov 2024 19:49:42 +0100 (CET) In-Reply-To: (Alan Third's message of "Sat, 30 Nov 2024 18:16:39 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296196 Archived-At: Alan Third writes: > On Sat, Nov 30, 2024 at 06:25:01PM +0100, Manuel Giraud wrote: >> Here is a new version with Alan suggestions. >> >> FTR, the gain is much less interesting. Here is the new timing with >> same benchmark (see below): >> (4.381739669 1 0.1034133749999997) > > That's unfortunate, although here I see an improvement of greater than > 2x. Probably I could do with finding some larger images as the whole > thing completes in under a second even without your patch. > > I've had a quick dig into lookup_rgb_color and assuming you have a > true colour display and there's no gamma calculation going on (I don't > know when that happens) it shouldn't be doing a whole lot more. > Perhaps it's just the extra over-head of calling a function? I also have a quick look at lookup_rgb_color and it seems to me that if the user has a true color display (I suspect almost everyone nowadays), we can spare the computation ct_hash_rgb and hence also spare to allocate a ct_table. WDYT? -- Manuel Giraud