ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: "Ivan A. Melnikov" <iv@altlinux.org>
To: sisyphus@lists.altlinux.org
Subject: Re: [sisyphus] I: Регрессия производительности в gcc-4.5 при -Os
Date: Tue, 29 Jun 2010 08:11:34 +0400
Message-ID: <20100629081134.6b1ab6c7@deimos.localdomain> (raw)
In-Reply-To: <20100629033942.GA26032@mw.office.seiros.ru>

В Tue, 29 Jun 2010 07:39:42 +0400
Денис Смирнов <mithraen@altlinux.ru> пишет:

> On Sun, Jun 27, 2010 at 02:58:54AM +0300, Igor Zubkov wrote:
> 
> IZ> Что собственно, не логично. -Os это оптимизация по размеру
> IZ> бинарника. А то что оно бегало быстрее, просто совпадение.
> 
> Ага, только вот -O2 получается быстрее лишь в теории, а на практике
> -- это оптимизация "просто шоб было", а старое поведение -Os
> работало  как оптимизация по производительности.
> 
> Соответственно ключик "оптимизация как старый -Os" -- нужен.
> 

Наверное нужен, однако примерно такое поведение gcc независимо от
наличия такого ключа может быть получено сочетанием -O2 и тщательно *по
результатам профилирования) подобранных ключей -f<whatever>. Имхо,
использование -Os для чего-то, кроме оптимизации по размеру, это
(иногда довольно эффективная) попытка обмануть компилятор. А враньё
компилятору, опять же имхо, всегда не к добру.

P.S. В своё время тестировал несколько собственных программ -- все с
-O2 работали быстрее, чем с -Os. Правда, последний раз столь тщательно
я выбирал опции во времена gcc 4.1.

-- 
WBR,
Ivan A. Melnikov


  reply	other threads:[~2010-06-29  4:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-25 21:13 Michael Pozhidaev
2010-06-25 21:46 ` Igor Zubkov
2010-06-25 22:06   ` Kirill A. Shutemov
2010-06-25 22:41   ` Michael Pozhidaev
2010-06-26  0:04     ` Igor Zubkov
2010-06-26  3:39       ` Денис Смирнов
2010-06-26 23:58         ` Igor Zubkov
2010-06-29  3:39           ` Денис Смирнов
2010-06-29  4:11             ` Ivan A. Melnikov [this message]
2010-06-27  0:28 ` Aleksey Novodvorsky
2010-06-27  8:37   ` Alexey Gladkov
2010-06-27 20:09   ` [sisyphus] [JT] " Michael Shigorin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100629081134.6b1ab6c7@deimos.localdomain \
    --to=iv@altlinux.org \
    --cc=sisyphus@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git