There's a ton of code out there that using Vector
s, that might sometimes be better off with something else, say an SVector
or StrideArray
. This can reduce allocations, and potentially give big speedups. The obvious approach is to open a PR and suggest this change. But this is a slow process, and is especially unlikely to go through for code in Julia Base
.
This makes me wonder, would it be possible to tell Julia to change this in the lowered code, maybe using something like IRTools.jl or Cassette.jl? Has anyone explored this sort of thing?
Once upon a time there was some discussion here: https://github.com/FluxML/Flux.jl/issues/706
Last updated: Nov 22 2024 at 04:41 UTC