ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Alexey Tourbin <at@altlinux.ru>
To: devel@altlinux.ru
Subject: Re: [devel] perlbench: -Os vs -O2
Date: Tue, 23 May 2006 13:30:49 +0400
Message-ID: <20060523093049.GG23861@localhost.localdomain> (raw)
In-Reply-To: <200605231157.52356.led@altlinux.ru>

[-- Attachment #1: Type: text/plain, Size: 1248 bytes --]

On Tue, May 23, 2006 at 11:57:52AM +0300, Led wrote:
> В сообщении от 22 мая 2006 20:57 Alexey Tourbin написал(a):
> > Своего рода объяснение полученным результатам можно прочитать здесь:
> > http://www.faqs.org/docs/artu/ch12s03.html  "The most effective way to
> > optimize your code is to keep it small and simple."  Это касается в том
> > числе и бинарного кода.  (Далее приводится правдоподобное с технической
> > точки зрения объяснение: "Processor cycles are almost free", а любое
> > непопадание в кеш сводит на нет всё оптимизацию по переупорядочиванию
> > инструкций).
> 
> Надо бы проверить ещё на CPU с меньшим кешем (128k/256k), прежде чем делать 
> подобный вывод ИМХО.

На celeron 333 несколько лет назад наблюдалась такая же картина.
Нет оснований полагать, что на CPU с меньшим кешем результат будет
отличаться в пользу -O2.

Напротив, с очень большим кешем (в котором свободно осядет часть ядра,
часть glibc и часть RSS всех выполняющихся процессов) возможны варианты.

(Я надеюсь, что понятно, что приведенные цифры справедливы только для
перла; в перле используется много макросов, которые каждый раз
разворачиваются в длинные портянки; для других приложений выигрыш от -Os
может быть менее выраженным.)

[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]

      reply	other threads:[~2006-05-23  9:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-22 17:57 Alexey Tourbin
2006-05-23  7:15 ` Anton Farygin
2006-05-23  7:48   ` Victor Forsyuk
2006-05-23 10:39   ` Igor Zubkov
2006-05-23 10:54     ` Alexey Tourbin
2006-05-23  8:57 ` Led
2006-05-23  9:30   ` Alexey Tourbin [this message]

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=20060523093049.GG23861@localhost.localdomain \
    --to=at@altlinux.ru \
    --cc=devel@altlinux.ru \
    --cc=devel@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 Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/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 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

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


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