Make EWMA as fast as pandas

FYI, Base.OneTo is part of Julia’s public API. There’s noting wrong with using it, assuming appropriate.

Previously I would be skeptical of everything were you need to qualify with with Base. but I checked and at least by now OneTo is marked public with the new public keyword, so it’s not internal non-API.

Yes, it’s not the default for a* b + c, as in recent C/C++ compilers (clang). That doesn’t mean don’t use, it means, it’s always (a bit) faster, and when you’ve done the analysis that it’s safe, you can (and should?!) use it.

I didn’t do the analysis for fma here for this code, and note fma is usually more accurate, what people worry about are the rare exceptions, nor did I really look into

help?> Base.OneTo
2 Likes