# Benchmarking the Parallel 1D Heat Equation Solver in Chapel, Charm++, C++, HPX, Go, Julia, Python, Rust, Swift, and Java

**URL:** https://discourse.julialang.org/t/benchmarking-the-parallel-1d-heat-equation-solver-in-chapel-charm-c-hpx-go-julia-python-rust-swift-and-java/101330
**Category:** Numerics
**Tags:** hpc
**Created:** [July 7, 2023, 8:47pm UTC](https://discourse.julialang.org/t/benchmarking-the-parallel-1d-heat-equation-solver-in-chapel-charm-c-hpx-go-julia-python-rust-swift-and-java/101330 "2023-07-07T20:47:12Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Perrin\_Meyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/perrin_meyer/32/15686_2.png) [@Perrin\_Meyer](https://discourse.julialang.org/u/Perrin_Meyer)
#### Post date: [July 7, 2023, 8:47pm UTC](https://discourse.julialang.org/t/benchmarking-the-parallel-1d-heat-equation-solver-in-chapel-charm-c-hpx-go-julia-python-rust-swift-and-java/101330/1 "2023-07-07T20:47:12Z")

</div>

Interesting arXiv preprint… TLDNR: (Julia crushes Numpy…)

> **[Benchmarking the Parallel 1D Heat Equation Solver in Chapel, Charm++, C++,...](https://arxiv.org/abs/2307.01117)**
>
> Many scientific high performance codes that simulate e.g. black holes, coastal waves, climate and weather, etc. rely on block-structured meshes and use finite differencing methods to iteratively solve the appropriate systems of differential...

 ![cocomo](https://global.discourse-cdn.com/julialang/original/3X/b/1/b1eaa9616da204a0ddd9c8306ca6f36b9e716814.png)

---

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [July 7, 2023, 9:11pm UTC](https://discourse.julialang.org/t/benchmarking-the-parallel-1d-heat-equation-solver-in-chapel-charm-c-hpx-go-julia-python-rust-swift-and-java/101330/2 "2023-07-07T21:11:19Z")

</div>

It appears as if they have failed to read the performance tips section of the documentation. Lots of benchmarking outside of functions and global variables

---

<div class="post-metadata">

### Author: ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)
#### Post date: [July 7, 2023, 9:39pm UTC](https://discourse.julialang.org/t/benchmarking-the-parallel-1d-heat-equation-solver-in-chapel-charm-c-hpx-go-julia-python-rust-swift-and-java/101330/3 "2023-07-07T21:39:10Z")

</div>

As in other cases, I think that the best approach is (if someone wants to do it) improve their code sharing ideas here, and finally invite the authors to read the thread. Particularly without invading any of their spaces.

---

<div class="post-metadata">

### Author: ![Perrin\_Meyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/perrin_meyer/32/15686_2.png) [@Perrin\_Meyer](https://discourse.julialang.org/u/Perrin_Meyer)
#### Post date: [July 7, 2023, 10:39pm UTC](https://discourse.julialang.org/t/benchmarking-the-parallel-1d-heat-equation-solver-in-chapel-charm-c-hpx-go-julia-python-rust-swift-and-java/101330/4 "2023-07-07T22:39:45Z")

</div>

It’s interesting though how much faster Julia is than Numpy without “advanced” Julia optimizations…

---

<div class="post-metadata">

### Author: ![jmair](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jmair/32/35117_2.png) [@jmair](https://discourse.julialang.org/u/jmair)
#### Post date: [July 8, 2023, 9:00am UTC](https://discourse.julialang.org/t/benchmarking-the-parallel-1d-heat-equation-solver-in-chapel-charm-c-hpx-go-julia-python-rust-swift-and-java/101330/5 "2023-07-08T09:00:06Z")

</div>

This is interesting, and they are honest that they are not as familiar with Julia. I have been going through their code and making some improvements in [this branch](https://github.com/JamieMair/async_heat_equation/tree/improvements-to-julia-implementation). Already the benchmark for the heat test is much faster when timed using `BenchmarkTools.jl`.

I have only touched one of their files, but I am working on improving the others.

---

<div class="post-metadata">

### Author: ![Barget](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@Barget](https://discourse.julialang.org/u/Barget)
#### Post date: [July 8, 2023, 9:50am UTC](https://discourse.julialang.org/t/benchmarking-the-parallel-1d-heat-equation-solver-in-chapel-charm-c-hpx-go-julia-python-rust-swift-and-java/101330/6 "2023-07-08T09:50:10Z")

</div>

Interesting take. Bear in mind the “easiness” axis in their papers (it looks we tend here to focus on performance).

I expect implementing common tips will both increasing the performance … and perceived difficulty (to a much lesser extent, especially if it’s just about wrapping in a function, adding `$` when using `@btime`, etc.). Maybe it’s simple for most of people found on this discourse, but requires a refined understanding of what’s happening behind the curtain. Hence the expected increased in difficulty (easy to implement, but requires knowledge).

In that sense, the “Julia” point of the benchmark is not wrong, but should read “Julia (Naive)” and should be complemented by a “Julia (performance tips)”.

---

<div class="post-metadata">

### Author: ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)
#### Post date: [July 8, 2023, 10:11am UTC](https://discourse.julialang.org/t/benchmarking-the-parallel-1d-heat-equation-solver-in-chapel-charm-c-hpx-go-julia-python-rust-swift-and-java/101330/7 "2023-07-08T10:11:31Z")

</div>

Curiously the chapel implementation is all inside functions, probably because the language requires it. A more or less direct Julia translation from that would be faster in Julia maybe.

---

<div class="post-metadata">

### Author: ![raman\_kumar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raman_kumar/32/26782_2.png) [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)
#### Post date: [July 8, 2023, 10:11am UTC](https://discourse.julialang.org/t/benchmarking-the-parallel-1d-heat-equation-solver-in-chapel-charm-c-hpx-go-julia-python-rust-swift-and-java/101330/8 "2023-07-08T10:11:45Z")

</div>

If Chapel is so fast and easy then why it is not so famous ? They said that Python is easier than Julia. 😇
