VinDsl.jl icon indicating copy to clipboard operation
VinDsl.jl copied to clipboard

Get rid of most uses of Val{} types

Open jmxpearson opened this issue 9 years ago • 1 comments

According to this I've been killing performance by using Val types.

Currently, we have ExprDist{V <: Val} <: Distribution, but it's probably better just to find a way to define a unique typename for each ExprDist using a heuristic that can be relied on.

Also, the Val trick is used to dispatch update! on the method argument, but this is easier to fix.

jmxpearson avatar Apr 01 '16 13:04 jmxpearson

This is also used all over the place in _simplify_call to break up logic based on the type of function call being simplified. This is probably just a matter of refactoring.

Thankfully, the only things really broken (or hobbled by this are ExprDists, which don't fully work yet anyway.

jmxpearson avatar Apr 01 '16 13:04 jmxpearson