polybench
=========
[![Test](https://github.com/tueda/polybench/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/tueda/polybench/actions?query=branch:master)
[![PyPI version](https://badge.fury.io/py/polybench.svg)](https://pypi.org/project/polybench/)
Multivariate polynomial arithmetic benchmark tests.
Many scientific and engineering applications utilise multivariate polynomial
arithmetic in their algorithms and solutions. Here we provide a set of
benchmark tests for often-used operations in multivariate polynomial
arithmetic:
- Greatest common divisor
- Factorisation
Requirements
------------
- [Python](https://www.python.org/) >= 3.6.1
You also need at least one or more tools to be benchmarked.
They are (in alphabetical order):
- [Fermat](https://home.bway.net/lewis/)
- [FLINT](https://flintlib.org/): automatically downloaded via [vcpkg](https://vcpkg.io/)
(requires [CMake](https://cmake.org/) >= 3.15, a C compiler and the Make utility).
- [FORM](https://www.nikhef.nl/~form/):
if not available in the system, then
a [release binary](https://github.com/vermaseren/form/releases)
will be automatically downloaded.
- [Mathematica](https://www.wolfram.com/mathematica/):
indeed, [Free Wolfram Engine for Developers](https://www.wolfram.com/engine/) is sufficient to run.
- [reFORM](https://reform.readthedocs.io/en/latest/):
automatically downloaded
(requires [Rust](https://www.rust-lang.org/) >= 1.36).
- [Rings](https://rings.readthedocs.io/en/latest/):
automatically downloaded
(requires [JDK](https://www.oracle.com/technetwork/java/) >= 8).
- [Singular](https://www.singular.uni-kl.de/)
- [Symbolica](https://symbolica.io/):
automatically downloaded
(requires [Rust](https://www.rust-lang.org/) >= 1.73),
running in [restricted mode](https://symbolica.io/docs/get_started.html#license).
Getting started
---------------
Clone this repository and try to run the `run.sh` script:
```sh
git clone https://github.com/tueda/polybench.git
cd polybench
./run.sh --all
```
When starting the script for the first time, it automatically sets up
a virtual environment for required Python packages so that it will not dirty
your environment. Some of the tools are provided as libraries registered in
public package registries, so the first run takes some time to download,
compile and link them with test binaries. After testing, a CSV file and
comparison plots will be generated.
For practical benchmarking, configuration parameters should be set
adequately. See the help message shown by
```sh
./run.sh --help
```
You can also use [pip](https://pip.pypa.io/en/stable/),
[pipx](https://pipxproject.github.io/pipx/),
[Poetry](https://python-poetry.org/)
or [Docker](https://www.docker.com/) with this repository.
Installation with `pip(x) install` or `poetry install` makes a command
`polybench` available, which acts as the `run.sh` script described above.
```sh
pip install polybench
polybench --all
python -m polybench --all # alternative way to launch
```
```sh
pipx install polybench
polybench --all
```
```sh
git clone https://github.com/tueda/polybench.git
cd polybench
poetry install
poetry run polybench --all
```
```sh
docker build -t polybench:latest https://github.com/tueda/polybench.git
docker run -it --rm polybench:latest
./run.sh --all
```
Example
-------
| | |
|----------------|------------------------------------------------------------------------------|
| platform | Linux-5.15.0-84-generic-x86_64-with-glibc2.29 |
| python_version | 3.8.10.final.0 (64 bit) |
| cpu_brand | 12th Gen Intel(R) Core(TM) i9-12900 |
| cpu_count | 16 (logical: 24) |
| total_memory | 62.6GB |
| FLINT | flint 2.9.0, cc (GNU) 10.5.0 |
| FORM | FORM 4.3.1 (Apr 11 2023, v4.3.1) 64-bits |
| Mathematica | 14.1.0 for Linux x86 (64-bit) (July 22, 2024) |
| reFORM | 0.1.0-fix-serialize, rustc 1.81.0 (eeb90cda1 2024-09-04) |
| Rings | 2.5.8, JVM: 11.0.20.1 (Ubuntu 11.0.20.1+1-post-Ubuntu-0ubuntu120.04) |
| Singular | Singular for x86_64-Linux version 4.4.0 (44002, 64 bit) May 29 2024 14:14:10 |
| Symbolica | 0.11.0, rustc 1.81.0 (eeb90cda1 2024-09-04) |
![nontrivial-gcd](https://raw.githubusercontent.com/tueda/polybench-result/refs/heads/main/0.3.0/05/0002.figures/summary.png)
![nontrivial-factor](https://raw.githubusercontent.com/tueda/polybench-result/refs/heads/main/0.3.0/05/0004.figures/summary.png)
Additional benchmark results are available [here](https://github.com/tueda/polybench-result/tree/main).
Development
-----------
```bash
# Initialisation
poetry install
pre-commit install
# Linting and testing
pre-commit run --all-files
poetry run pytest
# Linting and testing for Cargo subproject
cd path/to/project
cargo fmt
cargo clippy
cargo test
# Linting and testing for Gradle subproject
cd path/to/project
./gradlew spotlessApply
./gradlew check
# Test run
./run.sh <options> # for example, --all
# Release a new version
./scripts/make-release.sh <new_version> # for example, 0.3.0rc1
```
License
-------
[MIT](https://github.com/tueda/polybench/blob/master/LICENSE)
Raw data
{
"_id": null,
"home_page": "https://github.com/tueda/polybench",
"name": "polybench",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0.0,>=3.6.1",
"maintainer_email": null,
"keywords": "benchmark, mathematics, multivariate-polynomials",
"author": "Takahiro Ueda",
"author_email": "t.ueda.od@juntendo.ac.jp",
"download_url": "https://files.pythonhosted.org/packages/f2/f8/d3df7deeacc69124d722af302345728d37f273a607bb282a2385ca9cb0f5/polybench-0.3.0.tar.gz",
"platform": null,
"description": "polybench\n=========\n\n[![Test](https://github.com/tueda/polybench/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/tueda/polybench/actions?query=branch:master)\n[![PyPI version](https://badge.fury.io/py/polybench.svg)](https://pypi.org/project/polybench/)\n\nMultivariate polynomial arithmetic benchmark tests.\n\nMany scientific and engineering applications utilise multivariate polynomial\narithmetic in their algorithms and solutions. Here we provide a set of\nbenchmark tests for often-used operations in multivariate polynomial\narithmetic:\n\n- Greatest common divisor\n- Factorisation\n\n\nRequirements\n------------\n\n- [Python](https://www.python.org/) >= 3.6.1\n\nYou also need at least one or more tools to be benchmarked.\nThey are (in alphabetical order):\n\n- [Fermat](https://home.bway.net/lewis/)\n- [FLINT](https://flintlib.org/): automatically downloaded via [vcpkg](https://vcpkg.io/)\n (requires [CMake](https://cmake.org/) >= 3.15, a C compiler and the Make utility).\n- [FORM](https://www.nikhef.nl/~form/):\n if not available in the system, then\n a [release binary](https://github.com/vermaseren/form/releases)\n will be automatically downloaded.\n- [Mathematica](https://www.wolfram.com/mathematica/):\n indeed, [Free Wolfram Engine for Developers](https://www.wolfram.com/engine/) is sufficient to run.\n- [reFORM](https://reform.readthedocs.io/en/latest/):\n automatically downloaded\n (requires [Rust](https://www.rust-lang.org/) >= 1.36).\n- [Rings](https://rings.readthedocs.io/en/latest/):\n automatically downloaded\n (requires [JDK](https://www.oracle.com/technetwork/java/) >= 8).\n- [Singular](https://www.singular.uni-kl.de/)\n- [Symbolica](https://symbolica.io/):\n automatically downloaded\n (requires [Rust](https://www.rust-lang.org/) >= 1.73),\n running in [restricted mode](https://symbolica.io/docs/get_started.html#license).\n\n\nGetting started\n---------------\n\nClone this repository and try to run the `run.sh` script:\n\n```sh\ngit clone https://github.com/tueda/polybench.git\ncd polybench\n./run.sh --all\n```\n\nWhen starting the script for the first time, it automatically sets up\na virtual environment for required Python packages so that it will not dirty\nyour environment. Some of the tools are provided as libraries registered in\npublic package registries, so the first run takes some time to download,\ncompile and link them with test binaries. After testing, a CSV file and\ncomparison plots will be generated.\n\nFor practical benchmarking, configuration parameters should be set\nadequately. See the help message shown by\n\n```sh\n./run.sh --help\n```\n\nYou can also use [pip](https://pip.pypa.io/en/stable/),\n[pipx](https://pipxproject.github.io/pipx/),\n[Poetry](https://python-poetry.org/)\nor [Docker](https://www.docker.com/) with this repository.\nInstallation with `pip(x) install` or `poetry install` makes a command\n`polybench` available, which acts as the `run.sh` script described above.\n```sh\npip install polybench\npolybench --all\npython -m polybench --all # alternative way to launch\n```\n```sh\npipx install polybench\npolybench --all\n```\n```sh\ngit clone https://github.com/tueda/polybench.git\ncd polybench\npoetry install\npoetry run polybench --all\n```\n```sh\ndocker build -t polybench:latest https://github.com/tueda/polybench.git\ndocker run -it --rm polybench:latest\n./run.sh --all\n```\n\n\nExample\n-------\n\n| | |\n|----------------|------------------------------------------------------------------------------|\n| platform | Linux-5.15.0-84-generic-x86_64-with-glibc2.29 |\n| python_version | 3.8.10.final.0 (64 bit) |\n| cpu_brand | 12th Gen Intel(R) Core(TM) i9-12900 |\n| cpu_count | 16 (logical: 24) |\n| total_memory | 62.6GB |\n| FLINT | flint 2.9.0, cc (GNU) 10.5.0 |\n| FORM | FORM 4.3.1 (Apr 11 2023, v4.3.1) 64-bits |\n| Mathematica | 14.1.0 for Linux x86 (64-bit) (July 22, 2024) |\n| reFORM | 0.1.0-fix-serialize, rustc 1.81.0 (eeb90cda1 2024-09-04) |\n| Rings | 2.5.8, JVM: 11.0.20.1 (Ubuntu 11.0.20.1+1-post-Ubuntu-0ubuntu120.04) |\n| Singular | Singular for x86_64-Linux version 4.4.0 (44002, 64 bit) May 29 2024 14:14:10 |\n| Symbolica | 0.11.0, rustc 1.81.0 (eeb90cda1 2024-09-04) |\n\n![nontrivial-gcd](https://raw.githubusercontent.com/tueda/polybench-result/refs/heads/main/0.3.0/05/0002.figures/summary.png)\n\n![nontrivial-factor](https://raw.githubusercontent.com/tueda/polybench-result/refs/heads/main/0.3.0/05/0004.figures/summary.png)\n\nAdditional benchmark results are available [here](https://github.com/tueda/polybench-result/tree/main).\n\n\nDevelopment\n-----------\n\n```bash\n# Initialisation\npoetry install\npre-commit install\n\n# Linting and testing\npre-commit run --all-files\npoetry run pytest\n\n# Linting and testing for Cargo subproject\ncd path/to/project\ncargo fmt\ncargo clippy\ncargo test\n\n# Linting and testing for Gradle subproject\ncd path/to/project\n./gradlew spotlessApply\n./gradlew check\n\n# Test run\n./run.sh <options> # for example, --all\n\n# Release a new version\n./scripts/make-release.sh <new_version> # for example, 0.3.0rc1\n```\n\n\nLicense\n-------\n\n[MIT](https://github.com/tueda/polybench/blob/master/LICENSE)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Multivariate polynomial arithmetic benchmark tests.",
"version": "0.3.0",
"project_urls": {
"Homepage": "https://github.com/tueda/polybench",
"Repository": "https://github.com/tueda/polybench"
},
"split_keywords": [
"benchmark",
" mathematics",
" multivariate-polynomials"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "62762e870333b0c1e5c66a3200da5b566ba2b0a518703ffce35e042ba4cc1e01",
"md5": "5864d8010836e84dc95dbc229cf4c52b",
"sha256": "6907835f95bfc1024165cb10420145f001520c9d485f0990254e0d9742941096"
},
"downloads": -1,
"filename": "polybench-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5864d8010836e84dc95dbc229cf4c52b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0.0,>=3.6.1",
"size": 108615,
"upload_time": "2024-09-28T08:59:40",
"upload_time_iso_8601": "2024-09-28T08:59:40.136168Z",
"url": "https://files.pythonhosted.org/packages/62/76/2e870333b0c1e5c66a3200da5b566ba2b0a518703ffce35e042ba4cc1e01/polybench-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f2f8d3df7deeacc69124d722af302345728d37f273a607bb282a2385ca9cb0f5",
"md5": "df61ab33e2557afb87a0c43fe9530e99",
"sha256": "0bd1f3e7133d3691b40bc09a1679e49e79bdc7bf00d89e9c0ab498aa2fb8e065"
},
"downloads": -1,
"filename": "polybench-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "df61ab33e2557afb87a0c43fe9530e99",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0.0,>=3.6.1",
"size": 102795,
"upload_time": "2024-09-28T08:59:41",
"upload_time_iso_8601": "2024-09-28T08:59:41.399504Z",
"url": "https://files.pythonhosted.org/packages/f2/f8/d3df7deeacc69124d722af302345728d37f273a607bb282a2385ca9cb0f5/polybench-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-28 08:59:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tueda",
"github_project": "polybench",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "polybench"
}