ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Alexey Tourbin <at@altlinux.ru>
To: devel@altlinux.ru
Cc: Mikhail Zabaluev <mhz@altlinux.org>
Subject: [devel] Re: gcc -O2 vs gcc -Os performance
Date: Fri, 9 May 2003 13:29:01 +0400
Message-ID: <20030509092901.GA16378@solemn.turbinal.org> (raw)
In-Reply-To: <20030312225709.GC1758@mhz.mikhail.zabaluev.name>


[-- Attachment #1.1: Type: text/plain, Size: 2829 bytes --]

On Thu, Mar 13, 2003 at 01:57:09AM +0300, Mikhail Zabaluev wrote:
> Мне неинтересно, у меня Pentium 4 :)
> По мне, наоборот, лучше -O3 (с inlining'ом и пр.),
> каковой я уже давно практикую.

Цифры?  Здесь только цифры имеют значение.  Вы можете запустить
прилагаемый тест на вашем P4?  Только честно. :)

В тесте используются:

- компилятор gcc-3.2.1-alt2
- bzip2-1.0.2-alt7 как пает для тестирования (*в spec-файле нужно
  предварительно закомментировать _optlevel*)
- openoffice-1.0.2-alt2.src.rpm, как пакет, содержащий очень большой
  bz2 файл
- машинка Cel333/128RAM; конечно, это не P4/1G, но, по моим ощущениям,
  таких машинок сейчас много; кроме того, базовая платформа у нас вообще
  i586

Результаты теста:

TEST FOR -O0
243.95user 1.10system 4:05.70elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (111major+912minor)pagefaults 0swaps
243.75user 1.12system 4:05.45elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (111major+912minor)pagefaults 0swaps
243.57user 1.34system 4:05.48elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (111major+912minor)pagefaults 0swaps
TEST FOR -O1
163.39user 1.31system 2:45.19elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (104major+912minor)pagefaults 0swaps
163.44user 1.40system 2:45.45elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (104major+912minor)pagefaults 0swaps
163.82user 1.13system 2:45.45elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (104major+912minor)pagefaults 0swaps
TEST FOR -O2
170.76user 1.29system 2:52.77elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (105major+912minor)pagefaults 0swaps
171.07user 1.08system 2:52.64elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (105major+912minor)pagefaults 0swaps
171.04user 1.14system 2:52.73elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (105major+912minor)pagefaults 0swaps
TEST FOR -Os
152.55user 1.25system 2:34.23elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (106major+912minor)pagefaults 0swaps
152.54user 1.20system 2:34.26elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (106major+912minor)pagefaults 0swaps
152.76user 1.13system 2:34.35elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (106major+912minor)pagefaults 0swaps
TEST FOR -O3
169.54user 1.39system 2:51.54elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (106major+912minor)pagefaults 0swaps
170.00user 1.03system 2:51.62elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (106major+912minor)pagefaults 0swaps
169.74user 1.20system 2:51.51elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (106major+912minor)pagefaults 0swaps

Похоже, что -Os является наиболее удачным набором оптимизаций.

[-- Attachment #1.2: bztest.sh --]
[-- Type: application/x-sh, Size: 336 bytes --]

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

  reply	other threads:[~2003-05-09  9:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-12  1:56 [devel] " Alexey Tourbin
2003-03-12  8:37 ` [devel] " Michael Shigorin
2003-03-12 17:02   ` Alexey Tourbin
2003-03-12 13:57 ` [devel] " Victor Forsyuk
2003-03-12 17:10   ` [devel] " Alexey Tourbin
2003-03-12 22:57   ` Mikhail Zabaluev
2003-05-09  9:29     ` Alexey Tourbin [this message]
2003-05-14  7:07       ` Igor Homyakov
2003-05-14 10:20         ` Mikhail Zabaluev
2003-05-14 10:33           ` Igor Homyakov
2003-05-14 10:38           ` Igor Homyakov
2003-05-16 21:31             ` [devel] Re: gcc -O2 vs gcc -Os performance -- gcc-3.3 Alexey Tourbin

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=20030509092901.GA16378@solemn.turbinal.org \
    --to=at@altlinux.ru \
    --cc=devel@altlinux.ru \
    --cc=mhz@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