Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/msrocka/olca-benchmarks
A project template for running micro-benchmarks of openLCA core functions.
https://github.com/msrocka/olca-benchmarks
jmh-benchmarks openlca
Last synced: about 1 month ago
JSON representation
A project template for running micro-benchmarks of openLCA core functions.
- Host: GitHub
- URL: https://github.com/msrocka/olca-benchmarks
- Owner: msrocka
- Created: 2018-07-10T14:52:06.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-18T17:13:42.000Z (almost 5 years ago)
- Last Synced: 2024-06-11T16:21:00.730Z (7 months ago)
- Topics: jmh-benchmarks, openlca
- Language: Java
- Homepage:
- Size: 52.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# olca-benchmarks
This is a project template for running micro-benchmarks of openLCA core
functions. It uses [jmh](http://openjdk.java.net/projects/code-tools/jmh/) from
the OpenJDK project with a pure Maven setup.## Usage
Put your benchmark, e.g. `MyBenchmark`, in the `org.openlca.core.benchmark`
package (see also the other examples in this package) and run the following
Maven command:```bash
mvn clean package exec:java -q -Dbenchmark=MyBenchmark
```Or execute the `run` script in this project:
```bash
run MyBenchmark
```## Examples
### Sparse vs. dense matrix-vector functions
Using a plain hash table based implementation in Java for matrix-vector
operations can be much faster than calling into an optimized BLAS library
(OpenBLAS 64bit; tests with an ecoinvent 3.4 system):```
Benchmark Mode Cnt Score Error Units
SparseMVOps.denseMultiplication avgt 3 0.210 ± 0.019 s/op
SparseMVOps.denseScaling avgt 3 0.456 ± 0.224 s/op
SparseMVOps.sparseMultiplication avgt 3 0.035 ± 0.002 s/op
SparseMVOps.sparseScaling avgt 3 0.038 ± 0.007 s/op
```### Field access in table scans
For full table scans it can be much faster to access the fields by index (e.g.
[getLong(int)](https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSet.html#getLong-int-))
instead by name (e.g. [getLong(String)](https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSet.html#getLong-java.lang.String-)).
These are results for the exchange table of [exiobase](https://nexus.openlca.org/database/exiobase):```
Benchmark Mode Cnt Score Error Units
ExchangeTableScan.scanByFieldNames avgt 5 40.594 ± 1.532 s/op
ExchangeTableScan.scanByFieldIndices avgt 5 10.749 ± 0.833 s/op
```