Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tpgillam/units
Messing around with units
https://github.com/tpgillam/units
Last synced: 16 days ago
JSON representation
Messing around with units
- Host: GitHub
- URL: https://github.com/tpgillam/units
- Owner: tpgillam
- License: mit
- Created: 2024-08-12T21:05:13.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-27T08:18:03.000Z (4 months ago)
- Last Synced: 2024-08-27T09:35:44.742Z (4 months ago)
- Language: Rust
- Size: 46.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Units
Experimenting with runtime unit systems in python, and benchmarking a few popular ones.
To fully build this you'll need rust installed.
Here's the output of running the `try_all.py` script, which runs some timings for simple operations.
The main point is that the `ostrich` library (a massively incomplete system prototyped within this repo) is basically the lowest overhead option that is possible in CPython:```
moooo> make
moooo> uv run python units/try_all.pyUnyt:
Scalar overhead: 284.74
Array overhead: 19.93Astropy:
Scalar overhead: 514.04
Array overhead: 27.25Pint:
Scalar overhead: 326.73
Array overhead: 28.26Ostrich:
Scalar overhead: 5.40
Array overhead: 1.68
```