# Fast LogSumExp over 4th dimension

**URL:** https://discourse.julialang.org/t/fast-logsumexp-over-4th-dimension/64182
**Category:** Performance
**Tags:** tullio, loopvectorization
**Created:** [July 6, 2021, 11:21pm UTC](https://discourse.julialang.org/t/fast-logsumexp-over-4th-dimension/64182 "2021-07-06T23:21:30Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![jroon](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@jroon](https://discourse.julialang.org/u/jroon)
#### Post date: [July 7, 2021, 4:31pm UTC](https://discourse.julialang.org/t/fast-logsumexp-over-4th-dimension/64182/10 "2021-07-07T16:31:45Z")

</div>

> [@dlakelan](#):
>
> Yes, but you clearly are getting the hang of Julia. Perhaps you can move somewhat more of your computation out of R.
> 
> Ive been using R since before version 1, back in 1999 or so. And while it’s an impressive piece of software, it doesn’t hold a candle to Julia’s elegance and power and comprehensibility. I think Hadley has particularly borked R comprehensibility through vast amounts of nonstandard evaluation.
> 
> I’ve been jumping ship everywhere I can. I’m at that stage where I have to have the docs open all the time, but hey it’s worth it.

No no don’t be fooled… I just happen to know from before about einstein summation notation, and as Tullio uses it that makes Tullio a bit easier to pick up for me… otherwise I have no clue what I’m doing 😅  
So I think I’ll link to myself in another thread here to answer as to my motivation with Julia: [Fast 4D argmax - #26 by jroon](https://discourse.julialang.org/t/fast-4d-argmax/58566/26) Short version - little time for wholesale conversions but I’m willing to dabble and Rcpp is beyond me. I think if you want to convert users to Julia from R, you aren’t competing with the tidyerse, you are competing with Rcpp, because speeding up particularly slow chunks of code is usually why R users turn to another language.

> [@stevengj](#):
>
> In general, you won’t get much benefit from Julia from moving a single vectorized function to Julia. See also this post: [Comparing Numba and Julia for a complex matrix computation - #3 by stevengj](https://discourse.julialang.org/t/comparing-numba-and-julia-for-a-complex-matrix-computation/63703/3)

My R version is not a single vectorised function though, its a short 7 line function. I had alot of success replacing another short R function with Julia before with much help from kind folks in this thread: [Fast 4D argmax - #22 by jroon](https://discourse.julialang.org/t/fast-4d-argmax/58566/22)

---

_[View the full topic](https://discourse.julialang.org/t/fast-logsumexp-over-4th-dimension/64182)._
