https://github.com/deric/java-chart-benchmark
Benchmark of Java plotting libraries
https://github.com/deric/java-chart-benchmark
Last synced: 5 months ago
JSON representation
Benchmark of Java plotting libraries
- Host: GitHub
- URL: https://github.com/deric/java-chart-benchmark
- Owner: deric
- Created: 2015-03-26T10:34:27.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-10-12T14:38:16.000Z (over 10 years ago)
- Last Synced: 2025-02-02T23:14:12.352Z (over 1 year ago)
- Language: Java
- Size: 422 KB
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Java Chart Benchmark
The purpose of this repository is to compare plotting libraries available for Java, especially in terms of speed and handling larger amounts of data. Tested libraries are following (feel free to suggest missing ones):
* [Gral](http://trac.erichseifert.de/gral/) - release 0.10
* [XChart](http://xeiam.com/xchart/) - release 2.4.3
* [JFreeChart](http://www.jfree.org/) - release 1.0.19
## Results
| Library | scatter 1k | scatter 10k |
|----------|:------------:|-------------:|
| Gral | 647ms/785ms | 867ms/1028ms |
| JFree | 409ms/480ms | 471ms/522ms |
| XChart | 50ms/253ms | 103ms/313ms |
| JMathPlot| 450ms/507ms | 459ms/532ms |
First time is measured after initilization of plotting class, second one after displaying whole `JFrame`. This times could be very different on different platforms (and versions of Java). Time measurement is not exact and might slightly differ each run, the goal is just to get a rough approximation of rendering speed.
## Charts
### Gral
[Source code](https://github.com/deric/java-chart-benchmark/blob/master/src/main/java/scatterplot1k/GralScatter.java)
Features:
* allows zooming

### JFree
[Source code](https://github.com/deric/java-chart-benchmark/blob/master/src/main/java/scatterplot1k/JFreeScatter2.java)

### XChart
[Source code](https://github.com/deric/java-chart-benchmark/blob/master/src/main/java/scatterplot1k/XChartScatter.java)

### JMathPlot
[Source code](https://github.com/deric/java-chart-benchmark/blob/master/src/main/java/scatterplot1k/JMathScatter.java)
The library is not at Maven, I used a [fork on github](https://github.com/deric/clueminer/tree/master/modules/math-plot) for testing.

## System
Measured on Linux
* Oracle Java 8 (1.8.0_40)
* Intel i5 CPU 661 @ 3.33GHz (4 cores)
* Linux (kernel 3.2.0-77)