Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iydon/burger.bench
Benchmark the Burgers' equation in multiple programming languages
https://github.com/iydon/burger.bench
Last synced: 16 days ago
JSON representation
Benchmark the Burgers' equation in multiple programming languages
- Host: GitHub
- URL: https://github.com/iydon/burger.bench
- Owner: iydon
- License: gpl-3.0
- Created: 2022-06-12T12:28:17.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-08T01:36:16.000Z (over 2 years ago)
- Last Synced: 2024-10-30T10:26:18.174Z (2 months ago)
- Language: Python
- Homepage:
- Size: 1.63 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
🟢🟩⬜🟩🟩
🟩⬜🟩⬜🟩
🟩🟩⬜🟩🟩
🟩⬜🟩⬜🟩
🟩🟩⬜🟩🟩
Burger.Bench
Benchmark the Burgers' Equation in Multiple Programming Languages
## Motivation
Five years ago, [Green Software Lab](https://github.com/greensoftwarelab) 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.
![](static/image/illustration/energy_efficiency_languages.png)
According to the paper and the [repository](https://github.com/greensoftwarelab/Energy-Languages), 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](static/image/illustration/idea.png) using the following programming languages:
- [x] C/C++
- [x] Fortran
- [x] Go
- [x] Julia
- [x] Python
- [x] Rust## Results
### Time
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 | ![](static/image/time/fdm/compile.png) | ![](static/image/time/fvm/compile.png) |
| Execute | ![](static/image/time/fdm/execute.png) | ![](static/image/time/fvm/execute.png) |### Memory
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 | ![](static/image/memory/fdm/VmRSS.png) | ![](static/image/memory/fvm/VmRSS.png) |
| VmSize | ![](static/image/memory/fdm/VmSize.png) | ![](static/image/memory/fvm/VmSize.png) |## Contributing
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](https://github.com/iydon/burger.bench/issues/new) with the tag "enhancement".
Don't forget to give the project a star! Thanks again!1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request## License
Distributed under the GPL-3.0 License. See `LICENSE.txt` for more information.