Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up the override registration phase #228

Merged
merged 3 commits into from
May 10, 2019
Merged

Conversation

robdockins
Copy link
Contributor

by prefiltering possible overrides first.

This significantly reduces the amount of startup time that is consumed
by installing overrides, especially C++ overrides that perform name demangling.

Each override that wants to be registered now provides a "matcher" which examines
the name of a symbol for an approximate test as to weather this override applies.
These can either be exact matches, prefix matches, or substring matches. Any
override that passes the prefilter test is considered in order, as before, to
determine more precicely if it applies.

On one modestly-sized example, this reduced overall verification time from
105 seconds to 32 seconds. The algorithm used here for pre-filtering is
quite naive, so additional improvements are perhaps possible. However,
at the momemnt, startup time is dominated by parsing the bitcode file itself.

Partially addresses #155

…rrides

first.  This significantly reduces the amount of startup time that is consumed
by installing overrides, especially C++ overrides that perform name demangling.

Each override that wants to be registered now provides a "matcher" which examines
the name of a symbol for an approximate test as to weather this override applies.
These can either be exact matches, prefix matches, or substring matches.  Any
override that passes the prefilter test is considered in order, as before, to
determine more precicely if it applies.

On one modestly-sized example, this reduced overall verification time from
105 seconds to 32 seconds.  The algorithm used here for pre-filtering is
quite naive, so additional improvements are perhaps possible.  However,
at the momemnt, startup time is dominated by parsing the bitcode file itself.
Copy link
Contributor

@langston-barrett langston-barrett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a straightforward and pragmatic approach.

@langston-barrett
Copy link
Contributor

Huh, the CI failure looks unrelated:

Configuring boomerang-1.3.1...
Preprocessing library for boomerang-1.3.1..
Building library for boomerang-1.3.1..
[1 of 9] Compiling Text.Boomerang.HStack ( Text/Boomerang/HStack.hs, dist/build/Text/Boomerang/HStack.o )
[2 of 9] Compiling Text.Boomerang.Pos ( Text/Boomerang/Pos.hs, dist/build/Text/Boomerang/Pos.o )
[3 of 9] Compiling Text.Boomerang.Prim ( Text/Boomerang/Prim.hs, dist/build/Text/Boomerang/Prim.o )
Text/Boomerang/Prim.hs:57:10: error:
     No instance for (Applicative (Parser e tok))
        arising from the superclasses of an instance declaration
     In the instance declaration for Monad (Parser e tok)
   |
57 | instance Monad (Parser e tok) where
   |          ^^^^^^^^^^^^^^^^^^^^

@robdockins
Copy link
Contributor Author

That CI failure is really strange... it's trying to build a really old version of boomerang.

@robdockins robdockins merged commit 6886f5a into master May 10, 2019
@langston-barrett langston-barrett deleted the rwd/faster-intrinsics branch May 10, 2019 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants