Closed
Description
We have plenty of this sort of thing:
for(extremely_tight_performance_critical_loop)
{
unsigned max_depth=options.get_unsigned_int_option("depth");
}
depth
doesn't ever change, there's no need to look it up in a table every time we do a symex step. I recommend that we find these things, and replace them with
class symext
{
public:
symext(const optionst &options)
: depth(options.get_unsigned_int_option("depth"))
{
}
protected:
const unsigned depth;
}
even if the option isn't constant, we can still have it as a member variable (although options that change through the life of the program are somewhat questionable...). Having a member variable means we don't do table lookups, and having the member const
additionally means that the branch predictor has a happier time (for boolean members).
Metadata
Metadata
Assignees
Labels
No labels