# Make EWMA as fast as pandas

**URL:** <https://discourse.julialang.org/t/make-ewma-as-fast-as-pandas/106416>\
**Category:** General Usage\
**Tags:** performance, dataframes\
**Created:** [November 18, 2023, 7:06pm UTC](https://discourse.julialang.org/t/make-ewma-as-fast-as-pandas/106416 "2023-11-18T19:06:20Z")\
**Posts on this page:** 1\
**Showing post:** 28

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [November 23, 2023, 5:07pm UTC](https://discourse.julialang.org/t/make-ewma-as-fast-as-pandas/106416/28 "2023-11-23T17:07:59Z")

</div>

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.

> [@lmiq](#):
>
> The use or not of fma is subject of long discussions here, and for sensible reasons it is not the default

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

```julia-auto
help?> Base.OneTo

```

> [@Why is Base.OneTo not exported?](https://discourse.julialang.org/t/why-is-base-oneto-not-exported/56976):
>
> It’s quite weird (and somewhat worrying) how I can’t refer to Base.OneTo as just OneTo: $ julia \_ \_ \_ \_(\_)\_ | Documentation: https://docs.julialang.org (\_) | (\_) (\_) | \_ \_ \_| |\_ \_\_ \_ | Type "?" for help, "]?" for Pkg help. | | | | | | |/ \_` | | | | |\_| | | | (\_| | | Version 1.5.3 (2020-11-09) \_/ |\_\_'\_|\_|\_|\_\_'\_| | |\_\_/ | julia\> OneTo ERROR: UndefVarError: OneTo not defined Stacktrace: [1] top-level scope [2] run\_repl(…

---

_[View the full topic](https://discourse.julialang.org/t/make-ewma-as-fast-as-pandas/106416)._
