You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let count = self.counts.entry(k.to_string()).or_insert(0);
*count = v
}
}
Both allocations and hashing can be expensive compared to solving, in fact I hacked examples/newton to skip console logging and to run the computation a bunch more times taking care of blackboxing the results - counting is responsible for about 20% of all the time.
And if I disable timing (Executor::timer) along with removing counting - newton example is suddenly 30% faster...
Any objections if I try to shove it out of the way? Timing doesn't seem to be used unless there are observers - should probably be disabled unless needed, counting can probably be made optional or made into observer, not 100% sure yet.
The text was updated successfully, but these errors were encountered:
That's not great. Thanks for investigating! I agree, both should be disabled if no observers are used. And even if observers are used, it should be possible to turn off function counting. A PR would be highly welcome! The only thing I would object to is turning function counting into an observer, because I plan to add stopping criteria based on the number of function evaluations in the future.
I noticed that
argmin
collects statistics about how many times functions are called, for example here and in a few other placesargmin/crates/argmin/src/core/state/iterstate.rs
Lines 1358 to 1363 in 35e00e2
Both allocations and hashing can be expensive compared to solving, in fact I hacked
examples/newton
to skip console logging and to run the computation a bunch more times taking care of blackboxing the results - counting is responsible for about 20% of all the time.And if I disable timing (
Executor::timer
) along with removing counting - newton example is suddenly 30% faster...Any objections if I try to shove it out of the way? Timing doesn't seem to be used unless there are observers - should probably be disabled unless needed, counting can probably be made optional or made into observer, not 100% sure yet.
The text was updated successfully, but these errors were encountered: