Gentoo Archives: gentoo-dev

From: Ciaran McCreesh <ciaranm@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: Stack smash protected daemons
Date: Fri, 24 Sep 2004 13:14:09
Message-Id: 20040924141036.2153b879@snowdrop.home
In Reply to: Re: [gentoo-dev] Re: Stack smash protected daemons by Spider
1 On Fri, 24 Sep 2004 14:42:03 +0200 Spider <spider@g.o> wrote:
2 | Can somone take the time to benchmark this properly though? we rather
3 | shouldn't have many "oh this sucks 15% cpu" rumours without
4 | substance. both string and integer, small and large software.
5
6 My measurements suggest that it's usually not significant, except on
7 things which do lots of string ops. Vim's syntax highlighting takes a
8 ~7% hit, for example, which is pretty sucky when it's running
9 interactively.
10
11 A rather crude way to test:
12
13 vim -U NONE -u NONE -i NONE -c ':syntax on | :let g:i=0 | :while (g:i <
14 1000) | :let g:i=g:i+1 | :syntax sync fromstart | :syntax clear |
15 :setfiletype c | :endwhile' -c ':qa!' ~/cvs/vim/src/regexp.c
16
17 The box in question is a p4m locked to 1200MHz. The CFLAGS I use are
18 "-O2 -march=pentium4 -fomit-frame-pointer -D__CIARANM_WAS_HERE__
19 -pipe". It's running stable x86.
20
21 Stuff that just crunches numbers is entirely unaffected. Stuff that
22 crunches numbers with tight deep recursive calls is mildly affected. The
23 only place I see it doing really undesirable things to performance is
24 where lots of string ops are going on.
25
26 (Before someone asks... The -D flag is so that I can catch possible new
27 candidates for bug 59506)
28
29 --
30 Ciaran McCreesh : Gentoo Developer (Sparc, MIPS, Vim, Fluxbox)
31 Mail : ciaranm at gentoo.org
32 Web : http://dev.gentoo.org/~ciaranm