public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: "dodji at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: libabigail@sourceware.org
Subject: [Bug default/19355] [PERF] Libabigail slow on the r300_dri.so binary
Date: Fri, 01 Jan 2016 00:00:00 -0000	[thread overview]
Message-ID: <bug-19355-9487-83wFMEXBbR@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-19355-9487@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=19355

--- Comment #3 from dodji at redhat dot com ---
I am keeping this bug open still, as I hope we can keep further improve these
times.

Profiling suggests that one area that is taking time now is string comparison,
especially during the type hashing necessary for emitting the native xml
representation out to disk.  My understanding so far is that we spend a
significant amount of time comparing (class) type names and qualified names.

Note that (interestingly), that string comparison doesn't show up as a hot spot
during type comparisons that are the core of libabigail's comparison engine.
This is because types are canonicalized and so comparing two types (in general)
amounts to comparing two pointers.  One exception to that is when we compare
two classes A and B, and when either A or B is a declaration-only class.  In
that case, that comparison involves comparing their names.

Thus, I think that interning those strings
(https://en.wikipedia.org/wiki/String_interning) would help speed up things
here.

So maybe we could try to come up with an abigail::intern_string type that would
have methods to inter-operate seamlessly with the current std::string which is
used throughout the code base.  We'd then make abigail::decl_base::get_name()
and abigail::decl_base::get_qualified_name() return abigail::intern_string,
adjust what needs adjusting and see what we get in terms of speed increase
there.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2016-01-04 21:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-01  0:00 [Bug default/19355] New: " dodji at redhat dot com
2016-01-01  0:00 ` [Bug default/19355] " dodji at redhat dot com
2016-01-01  0:00 ` dodji at redhat dot com
2016-01-01  0:00 ` dodji at redhat dot com [this message]
2016-01-01  0:00 ` dodji at redhat dot com
2016-01-01  0:00 ` dodji at redhat dot com
2016-01-01  0:00 ` dodji at redhat dot com
2020-11-11 16:55 ` maennich at android dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-19355-9487-83wFMEXBbR@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=libabigail@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).