View previous topic :: View next topic |
Author |
Message |
coldmist n00b
Joined: 05 Jul 2004 Posts: 1
|
Posted: Mon Jul 05, 2004 7:43 pm Post subject: Improving Via C3 performance by masking FPU exceptions |
|
|
According to this article, C3 FPU performance can be greatly enhanced by masking FPU exceptions.
Has anyone tried this with gcc on Linux? Is it already being done? If not, could it be added in a few key places to improve C3 performance?
Coldmist |
|
Back to top |
|
|
fonzarely n00b
Joined: 02 Sep 2003 Posts: 38 Location: Paris
|
Posted: Sun Aug 01, 2004 1:02 am Post subject: |
|
|
Hello,
i have a EPIA M-10 000 with VIA C3 Ezra.
My gcc FLAGS :
CHOST="i586-pc-linux-gnu"
CFLAGS="-march=i586 -m3dnow -O3 -pipe -fomit-frame-pointer"
works fine
hope to help |
|
Back to top |
|
|
cpdsaorg Guru
Joined: 16 Oct 2003 Posts: 359
|
Posted: Fri Oct 01, 2004 10:22 pm Post subject: |
|
|
question is, is it possible to take advantaggge of thei with a simple gcc flag or is it necessary to add the suggestion to the code directly.
From what I gather from the article this is a coding issue and would have to be put into every piece of software that you use just before a block of code that uses the fp... _________________ PentiumM 2.0 GHz, MSI 915GM Speedster-FA4, Seagate ST3500641AS SATA 400GB |
|
Back to top |
|
|
matthies n00b
Joined: 12 Dec 2004 Posts: 16
|
Posted: Wed Dec 29, 2004 10:40 pm Post subject: |
|
|
i don't have a c3 so i don't have any way to test this but you might want to try -ffast-math and the options implied by it, such as -fno-math-errno, -fno-trapping-math etc. just have a look in the gcc manual. |
|
Back to top |
|
|
racoontje Veteran
Joined: 19 Jul 2004 Posts: 1290
|
Posted: Wed Jan 05, 2005 10:10 pm Post subject: |
|
|
matthies:
I suggest you read it yourself -fprofile-use enables all useful math-ish (things that generally only get you performance gains when you're using profiles) CFLAGS, such as -ffast-math... |
|
Back to top |
|
|
matthies n00b
Joined: 12 Dec 2004 Posts: 16
|
Posted: Thu Jan 06, 2005 3:57 am Post subject: |
|
|
to quote from the gcc 3.4.3 online manual:
Code: |
-fprofile-use
Enable profile feedback directed optimizations, and optimizations generally profitable only with profile feedback available.
The following options are enabled: -fbranch-probabilities, -fvpt, -funroll-loops, -fpeel-loops, -ftracer.
|
it wouldn't really make sense to wait for profiling to tell you that -ffast-math is faster because it always is. |
|
Back to top |
|
|
recordista n00b
Joined: 14 May 2004 Posts: 40 Location: Reno, NV (US)
|
Posted: Sun Jan 09, 2005 11:55 pm Post subject: |
|
|
fonzarely wrote: | Hello,
i have a EPIA M-10 000 with VIA C3 Ezra.
My gcc FLAGS :
CHOST="i586-pc-linux-gnu"
CFLAGS="-march=i586 -m3dnow -O3 -pipe -fomit-frame-pointer"
|
I've read several places that, due to the small cache size of the VIA C3 chips, -Os usually works better than -O3. Does someone have newer info? |
|
Back to top |
|
|
!equilibrium Bodhisattva
Joined: 06 Jun 2004 Posts: 2109 Location: MI/BG/LC
|
Posted: Thu Apr 28, 2005 4:52 pm Post subject: |
|
|
recordista wrote: | fonzarely wrote: | Hello,
i have a EPIA M-10 000 with VIA C3 Ezra.
My gcc FLAGS :
CHOST="i586-pc-linux-gnu"
CFLAGS="-march=i586 -m3dnow -O3 -pipe -fomit-frame-pointer"
|
I've read several places that, due to the small cache size of the VIA C3 chips, -Os usually works better than -O3. Does someone have newer info? |
with gcc 3.3.x and higher you can safely use:
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=c3 -O2 -pipe"
CXXFLAGS="-march=c3 -O2 -pipe -fvisibility-inlines-hidden"
-m3dnow, -fomit-frame-pointer are implicit of -O
optionally you can use: "-ffast-math" and "-Os" _________________ Arch Tester for Gentoo/FreeBSD
Equilibrium's Universe
all my contents are released under the Creative Commons Licence by-nc-nd 2.5 |
|
Back to top |
|
|
Voltago Advocate
Joined: 02 Sep 2003 Posts: 2593 Location: userland
|
Posted: Fri May 06, 2005 10:17 am Post subject: |
|
|
DarkAngel76 wrote: |
with gcc 3.3.x and higher you can safely use:
CHOST="i686-pc-linux-gnu"
|
Really, for an Ezra CPU? What about Samuel-2? Can you give a source for this? Thanks! |
|
Back to top |
|
|
!equilibrium Bodhisattva
Joined: 06 Jun 2004 Posts: 2109 Location: MI/BG/LC
|
Posted: Sat May 07, 2005 12:31 pm Post subject: |
|
|
Voltago wrote: | DarkAngel76 wrote: |
with gcc 3.3.x and higher you can safely use:
CHOST="i686-pc-linux-gnu"
|
Really, for an Ezra CPU? What about Samuel-2? Can you give a source for this? Thanks! |
i have alsao a notebook with VIA Samuel-2 733Mhz and i use successfuly:
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=c3 -Os -pipe -ffast-math"
CXXFLAGS="-march=c3 -Os -pipe -fvisibility-inlines-hidden -ffast-math"
p.s.: do not use extreme prelink with LDFLAGS because you obtain the opposite effect: slowing down the machine _________________ Arch Tester for Gentoo/FreeBSD
Equilibrium's Universe
all my contents are released under the Creative Commons Licence by-nc-nd 2.5 |
|
Back to top |
|
|
Voltago Advocate
Joined: 02 Sep 2003 Posts: 2593 Location: userland
|
Posted: Tue May 10, 2005 3:48 pm Post subject: |
|
|
DarkAngel76, can you post the /proc/cpuinfo of your Samuel-2 machine please? I cross-compiled a system with CHOST="i686-pc-linux-gnu" for my epia board and found that bash and sash fail with 'illegal instruction' errors. As soon as a replace them with natively built versions (i586), the system works fine (openssh, openvpn, ...). |
|
Back to top |
|
|
!equilibrium Bodhisattva
Joined: 06 Jun 2004 Posts: 2109 Location: MI/BG/LC
|
Posted: Wed May 11, 2005 12:02 pm Post subject: |
|
|
Voltago wrote: | DarkAngel76, can you post the /proc/cpuinfo of your Samuel-2 machine please? I cross-compiled a system with CHOST="i686-pc-linux-gnu" for my epia board and found that bash and sash fail with 'illegal instruction' errors. As soon as a replace them with natively built versions (i586), the system works fine (openssh, openvpn, ...). |
sure, not a problem:
Code: |
processor : 0
vendor_id : CentaurHauls
cpu family : 6
model : 7
model name : VIA Samuel 2
stepping : 2
cpu MHz : 399.026
cache size : 64 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu de tsc msr cx8 mtrr pge mmx pni 3dnow
bogomips : 789.20 |
without speedfreq:
Code: | processor : 0
vendor_id : CentaurHauls
cpu family : 6
model : 7
model name : VIA Samuel 2
stepping : 2
cpu MHz : 731.049
cache size : 64 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu de tsc msr cx8 mtrr pge mmx pni 3dnow
bogomips : 1445.88 |
and here is my emerge info:
Code: | Portage 2.0.51.21 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc-2.3.4.20050125-r0, 2.6.11-gentoo i686)
=================================================================
System uname: 2.6.11-gentoo i686 VIA Samuel 2
Gentoo Base System version 1.6.6
dev-lang/python: 2.3.5
sys-apps/sandbox: 1.2.2
sys-devel/autoconf: 2.13, 2.59-r6
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.4
sys-devel/binutils: 2.15.92.0.2-r1
sys-devel/libtool: 1.5.2-r7
virtual/os-headers: 2.6.8.1-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-mtune=c3 -Os -pipe -ffast-math"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var /var/qmail/alias /var/qmail/control /var/vpopmail/domains /var/vpopmail/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-mtune=c3 -Os -pipe -ffast-math -fvisibility-inlines-hidden -ffast-math"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://www.die.unipd.it/pub/Linux/distributions/gentoo-sources"
LINGUAS="it"
MAKEOPTS="-j1 -s"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X a52 aalib acpi aim alsa apache2 avi bash-completion berkdb bitmap-fonts bmp bzlib cdr crypt cups curl curlwrappers divx4linux dvd dvdr eds emboss encode exif fam flac foomaticdb fortran ftp gd gdbm gif gpg gphoto2 gpm gtk gtk2 gtkhtml guile hal icq imap imlib jack java jpeg junit kde libg++ libwww memlimit mikmod mime ming mmap mmx mng motif mozsvg mozxmlterm mp3 mpeg msn mysql ncurses nls nptl nptlonly objc ogg oggvorbis opengl packagemetabuilds pam pcntl pdflib perl png posix postgres python qmail qt quicktime readline samba scanner sdl session sftplogging simplexml slang socket spamassassin spell sqlite sse ssl svg svga tcltk tcpd tiff truetype truetype-fonts type1-fonts vorbis wmf x86 xine xml xml2 xmlrpc xmms xprint xv xvid yahoo zlib video_cards_sis linguas_it userland_GNU kernel_linux libc_glibc"
Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS |
_________________ Arch Tester for Gentoo/FreeBSD
Equilibrium's Universe
all my contents are released under the Creative Commons Licence by-nc-nd 2.5 |
|
Back to top |
|
|
|