This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Regression: Re: [PATCH 2/6] Code cleanup: dwarf2read.c: Eliminate ::file_write
On 06/19/2017 11:03 AM, Jan Kratochvil wrote:
> On Mon, 19 Jun 2017 11:47:51 +0200, Pedro Alves wrote:
>> But as I said, it can't be exactly the
>> same as the original one, because it simply wouldn't compile.
>
> I haven't found a benchmark whether the gdb::byte_vector optimization was
> really worth complicating the codebase. GDB has more serious performance
> problems than such microoptimizations.
That's not a valid argument for justifying performance regressions.
byte_vector avoids premature pessimization, at no real expense of
readability, and makes it easier to actually use std::vector (because
that's what byte_vector is) in more cases without worrying about
whether that'd cause a regression vs a dynamic array, as I've showed in
the patch that introduced it.
The C++ breakpoints series from a couple weeks back has some
performance fixes, and I'll be happy to review more patches that help
with any of those performance problems you may be alluding to.
> One of the goals of the move to C++ was to remove all the GDB-specific
> language constructs making it easier to contribute. Now GDB is becoming
> written in its own language again, just based on C++ this time.
That's a gross exaggeration. In any case, a byte buffer is not semantically
the same as a vector of integers. And custom containers and other similar data
structures don't seem to have caused an issue for competing toolchains, btw.
Thanks,
Pedro Alves