[MPlayer-cvslog] CVS: main/libaf af_format.c,1.26,1.27
Michael Niedermayer
michaelni at gmx.at
Tue Feb 22 21:40:22 CET 2005
Hi
On Tuesday 22 February 2005 21:19, D Richard Felker III wrote:
> On Tue, Feb 22, 2005 at 09:58:49PM +0200, Oded Shimon wrote:
> > On Tuesday 22 February 2005 21:53, D Richard Felker III wrote:
> > > On Tue, Feb 22, 2005 at 05:29:59PM +0100, Reimar Döffinger wrote:
> > > > How about just improving the configure check
> > > > (-Werror-implicit-function-declaration maybe?).
> > >
> > > Perhaps, but imo it's bad to use lrintf anyway -- it's probably slow
> > > unless the libc makes it inline.
> >
> > Actually, rather amazing part - I just benchmarked lrintf without
> > '-D_GNU_SOURCE' and with -lm, (it gave an implicit declaration warning
> > btw, and I did include math.h) - it was 0.6s! still faster than cast,
> > which is 0.9+s, and only slightly slower than 0.55s inline lrintf.
> >
> > I can't really make any decisions about which method is best, but I can
> > tell that those are the benchmarks.
>
> I can also tell you, from our discussion on irc, that your benchmarks
> are totally unscientific and bogus. :)
here are a few better? ones, source attached too
results:
107327 dezicycles in cast, 64 runs, 0 skips
31671 dezicycles in lrintf, 64 runs, 0 skips (-lm)
11919 dezicycles in lrintf, 64 runs, 0 skips (-D_GNU_SOURCE)
compiled with:
gcc -O3 -fomit-frame-pointer float-test.c -o float-test -D_GNU_SOURCE
gcc 3.4.4
500mhz p3
[...]
--
Michael
"nothing is evil in the beginning. Even Sauron was not so." -- Elrond
-------------- next part --------------
A non-text attachment was scrubbed...
Name: float-test.c
Type: text/x-csrc
Size: 1529 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-cvslog/attachments/20050222/131a75fb/attachment.c>
More information about the MPlayer-cvslog
mailing list