delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/06/29/11:32:39

Sender: root AT delorie DOT com
Message-ID: <3778DF4C.ADE7D3F4@inti.gov.ar>
Date: Tue, 29 Jun 1999 11:59:24 -0300
From: salvador <salvador AT inti DOT gov DOT ar>
Organization: INTI
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: es-AR, en, es
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: regparm... byte benchmarks
References: <19990628165640 DOT A197 AT tabor DOT ta DOT jcu DOT cz>
Reply-To: djgpp-workers AT delorie DOT com

Jan Hubicka wrote:

> Hi
> I've found the byte benchmarks on my hdd, so here are the results:
> (-fomit-frame-pointer -O3 -mregparm=x)
> regparm                 0            1             2               3
> size                100kb        98kb          97kb           96kb
> integer             1.865239     1.867126      1.878186       1.892956
> fp                  1.421428     1.503115      1.493591       1.494438
>
> so here is approx 4% difference in executable size and similar difference
> in running speed.

I got similar results, the speed up isn't thanks to passing the parameters in the
registers, but instead thanks to the fact that using it you don't need to adjust the
stack! this saving is just because gcc doesn't need to emit the add $nn,%esp.

> So overall mregparm=3 seems to do best job
> There are slight regresions in some tests between regparm0 and regparm3.
> The largest slowdown is stringsort 2.06 -> 2.04 (about 1%, so it can be statistical
> error as well, as the slowdown between mregparm=1 to mregparm=3 in fp tests)

Yes, these tests have more than 1% of error.

> Largest speedups are in the fourier (1.62 -> 1.87 and huffman 1.86->2.04)

I'll apply it to these benchmarks, currently I tried only with the numeric sort.
BTW, try the memmove from djgpp v2.03 and you'll see a big speed up in the strings,
sort.

> so mregparm seems to be win.

Yes it left gcc 2.95 very close to MSVC 5.0.

SET

--
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Visit my home page: http://welcome.to/SetSoft or
http://www.geocities.com/SiliconValley/Vista/6552/
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
                    set AT ieee DOT org set-soft AT bigfoot DOT com
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019