From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Re: Optimize glyph row clearing and copying routines Date: Tue, 24 Sep 2013 14:10:07 +0400 Message-ID: <524164FF.10407@yandex.ru> References: <83a9j2iv6o.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1380017438 27690 80.91.229.3 (24 Sep 2013 10:10:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Sep 2013 10:10:38 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 24 12:10:41 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VOPZm-0008Fx-ME for ged-emacs-devel@m.gmane.org; Tue, 24 Sep 2013 12:10:38 +0200 Original-Received: from localhost ([::1]:44738 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOPZm-0000pv-1z for ged-emacs-devel@m.gmane.org; Tue, 24 Sep 2013 06:10:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOPZc-0000pc-Iy for emacs-devel@gnu.org; Tue, 24 Sep 2013 06:10:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOPZV-00052N-L1 for emacs-devel@gnu.org; Tue, 24 Sep 2013 06:10:28 -0400 Original-Received: from forward11.mail.yandex.net ([95.108.130.93]:47601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOPZO-0004zy-2G; Tue, 24 Sep 2013 06:10:14 -0400 Original-Received: from smtp11.mail.yandex.net (smtp11.mail.yandex.net [95.108.130.67]) by forward11.mail.yandex.net (Yandex) with ESMTP id E7AF5E80B53; Tue, 24 Sep 2013 14:10:07 +0400 (MSK) Original-Received: from smtp11.mail.yandex.net (localhost [127.0.0.1]) by smtp11.mail.yandex.net (Yandex) with ESMTP id AFC3D7E02D0; Tue, 24 Sep 2013 14:10:07 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp11.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Y0stNRPpqe-A7hG4RQH; Tue, 24 Sep 2013 14:10:07 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1380017407; bh=gadGirWDY/Fp8TGXe5/JDK8RjVL+QqbF99DDfBbvQ+A=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=i+n0myg2cPWjgHgKZ/8yYMu0nCbQ+GVTYLygdcSGzQwu0yowAMojXw0HLRNpsJ9g9 AVxH9I4bi8BPMgAdC3p1hwP5iI9ZIJM01Hcm9Hvl9un9KTNohNsrPaPGWZ9KDv4Iaw LM9RZT0rqBN4Pg8Rbq94z6F+tBcxQO3ulBPPeLyM= Authentication-Results: smtp11.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 In-Reply-To: <83a9j2iv6o.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 95.108.130.93 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:163591 Archived-At: On 09/24/2013 10:35 AM, Eli Zaretskii wrote: > Does this change really speed up the code? YMMV, as usual with benchmarks. Time is in CPU cycles, smaller is better: It was: gcc 4.8.1 gcc 4.8.1 Intel C 13.1.3 clang 3.3 -O2 -g3 -O3 -march=native -O3 -xHOST -O3 -march=native ------------------------------------------------------------------------------------------ clear_glyph_row 100 140 90 40 copy_row_except_pointers 90 160 80 100 Now it is: gcc 4.8.1 gcc 4.8.1 Intel C 13.1.3 clang 3.3 -O2 -g3 -O3 -march=native -O3 -xHOST -O3 -march=native ------------------------------------------------------------------------------------------ clear_glyph_row 75 60 35 35 copy_row_except_pointers 95 150 50 70 (Intel C and clang makes heavy use of SSE, but gcc isn't). It would be interesting to add MSVC to this table :-). In short, I believe that a good compiler should get more optimization opportunities from new code rather than from old. For this particular case, Intel C is "definitely good", and gcc, hm...looks controversial at least. Dmitry