🟩⬜🟩⬜🟩
🟩🟩⬜🟩🟩
🟩⬜🟩⬜🟩
🟩🟩⬜🟩🟩
Benchmark the Burgers' Equation in Multiple Programming Languages
Five years ago, Green Software Lab benchmarked 28 different programming languages with 10 distinct algorithms, where the benchmarking metrics were runtime, memory usage and energy consumption. The normalized results are shown in the figure below.
According to the paper and the repository, the 10 distinct algorithms used for benchmarking are shown in the table below, some of which are not computationally intensive.
Benchmark | Description |
---|---|
binary-trees | Allocate, traverse and deallocate many binary trees |
fannkuch-redux | Indexed access to tiny integer sequence |
fasta | Generate and write random DNA sequences |
k-nucleotide | Hashtable update and k-nucleotide strings |
mandelbrot | Generate Mandelbrot set portable bitmap file |
n-body | Double precision N-body simulation |
pidigits | Streaming arbitrary precision arithmetic |
regex-redux | Match DNA 8mers and substitute magic patterns |
reverse-complement | Read DNA sequences, write their reverse-complement |
spectral-norm | Eigenvalue using the power method |
Therefore, in order to initially investigate what programming language is suitable for computational fluid dynamics, we implemented the programs for solving the Burgers' equation by the finite-volume method using the following programming languages:
- C/C++
- Fortran
- Go
- Julia
- Python
- Rust
For the time metrics, we recorded compile time and runtime. Compile time is largely independent of the grid resolution, while runtime is polynomial complexity.
FDM | FVM | |
---|---|---|
Compile | ||
Execute |
For memory metrics, we use linux's /proc/$pid/status
to record the resident set size (VmRSS) and the virtual memory size (VmSize).
FDM | FVM | |
---|---|---|
VmRSS | ||
VmSize |
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion to make this better, or find something incorrect, please fork the repository and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the GPL-3.0 License. See LICENSE.txt
for more information.