Chad Scherrer

Results 365 comments of Chad Scherrer

This is supposed to do it, but it's not generating `.mem` files for me. Not sure what I'm doing wrong: https://docs.julialang.org/en/v1/manual/profile/#Memory-allocation-analysis

Ok so this is not a _great_ way to do it, but it's a start... 1. Make sure the functions you want to inspect are in a file. They might...

To generalize this a bit from a discussion with @ablaom on Slack, it seems like there are at least four different cases to consider: 1. Change the model _itself_, for...

Say I'm building a `mul(A::AbstractMatrix, x::AbstractVector)`, and I dispatch using `ArrayInterface.size`. It seems to me this would only be entirely static when _all_ sizes are known statically. `known_size` seems to...

Oh, maybe something like ```julia struct Sized{S,T} x::T end Sized(x::T) where {T} = Sized{ArrayInterface.known_size(T), T}(x) ``` ? Then dispatch is easier: ```julia julia> f(::Sized{(3,)}) = "three" f (generic function with...

Ok, how would you decide whether to take this approach or to use `StaticArrays.Size`?

Ah, there's the missing context. That's really helpful, thanks!

> Not sure what you meant here, but `ArrayInterface.size` shouldn't be resulting in dynamic dispatches. I think it depends how you use it - I'm just trying to figure out...

Ok, this is making some more sense. Thank you for your help!

I've thought about this some more while working on https://github.com/cscherrer/MultivariateMeasures.jl. There are two main cases that come up. First, we may have full control over the generic implementation. That's like...