Setting a variable is very slow.
Daniel Jacobowitz
drow@false.org
Sat Apr 21 13:41:00 GMT 2007
On Sat, Apr 21, 2007 at 01:43:25PM +0100, jagorak wrote:
> I need to make hundreds of such assignments & calls. The problem is -
> setting a single variable is very slow (in most cases it takes much
> more time to set a single variable than to call a procedure, even if
> the procedure is not very simple).
>
> Any ideas why this is the case?
I know of some problems in this area, but it's not clear which one is
your problem here. Could you try building gdb with
--enable-profiling? It should generate a gmon.out. That might not
show the real problem; if you want to just build a debuggable version
and use oprofile, that might work better. It depends whether GDB is
eating CPU or being wasteful with ptrace operations.
--
Daniel Jacobowitz
CodeSourcery
More information about the Gdb
mailing list