Skip to content

Commit 017622b

Browse files
committed
released 2.0.7
1 parent db93bda commit 017622b

13 files changed

Lines changed: 154 additions & 124 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.mp4 filter=lfs diff=lfs merge=lfs -text

LATEST.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# ParserNG
22

33

4+
5+
### ParserNG 2.0.7 is out on maven-central!
6+
Full migration of all inbuilt functions and UDFs to the Vector API(not stats functions), leading to 2.0x to 20x speedup in bulk evaluations
7+
8+
49
### ParserNG 2.0.6 is out on maven-central!
510
Very stable release. Lots of bug fixes in bulk gelu, swiglu etc
611

README.md

Lines changed: 112 additions & 87 deletions
Large diffs are not rendered by default.

parser-ng-bench/dependency-reduced-pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
<parent>
44
<artifactId>parser-ng-parent</artifactId>
55
<groupId>com.github.gbenroscience</groupId>
6-
<version>2.0.6</version>
6+
<version>2.0.7</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99
<artifactId>parser-ng-bench</artifactId>
1010
<name>parser-ng-bench</name>
11-
<version>2.0.6</version>
11+
<version>2.0.7</version>
1212
<build>
1313
<plugins>
1414
<plugin>
@@ -24,7 +24,7 @@
2424
<finalName>benchmarks</finalName>
2525
<transformers>
2626
<transformer>
27-
<mainClass>org.openjdk.jmh.Main</mainClass>
27+
<mainClass>com.github.gbenroscience.parser.ng.bench.ParserNgBench</mainClass>
2828
</transformer>
2929
</transformers>
3030
<filters>

parser-ng-bench/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
<parent>
55
<groupId>com.github.gbenroscience</groupId>
66
<artifactId>parser-ng-parent</artifactId>
7-
<version>2.0.6</version>
7+
<version>2.0.7</version>
88
</parent>
99
<artifactId>parser-ng-bench</artifactId>
1010
<name>parser-ng-bench</name>
11-
<version>2.0.6</version>
11+
<version>2.0.7</version>
1212
<packaging>jar</packaging>
1313
<properties>
1414
<exec.mainClass>com.github.gbenroscience.parser.ng.bench.ParserNgBench</exec.mainClass>
@@ -31,7 +31,7 @@
3131
<finalName>benchmarks</finalName>
3232
<transformers>
3333
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
34-
<mainClass>org.openjdk.jmh.Main</mainClass>
34+
<mainClass>com.github.gbenroscience.parser.ng.bench.ParserNgBench</mainClass>
3535
</transformer>
3636
</transformers>
3737
<filters>

parser-ng-bench/src/main/java/com/github/gbenroscience/parser/ng/bench/ParserNgBench.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public static final String[] getVars(String e) {
136136

137137
private double[] vars;
138138
private VectorTurboBench.JaninoMathFunction fastEvaluator;
139-
139+
140140
SIMDVectorTurboEvaluator.SIMDVectorCompositeExpression simdVectorTurbo;
141141

142142
private int varCount;

parser-ng-simd/README.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# parser-ng-simd
22

3-
### ParserNG 2.0.5
3+
### ParserNG 2.0.7
44

55
High-performance, hardware-accelerated mathematical kernels for Java. **No JNI. No native binaries.** Powered entirely by the JDK Vector API and optimized for C2 loop fusion.
66

77
`parser-ng-simd` provides an architectural extension for ParserNG, enabling zero-dependency, tile-based bulk evaluations via `jdk.incubator.vector`. It compiles mathematical expression trees into vectorized loops optimized for L1/L2 cache residency, achieving near-native throughput directly on the JVM without the configuration overhead of complex native toolchains (such as ND4J/`libnd4j`).
88

99
For examples and more information:
1010

11-
- [SIMD-EXAMPLES.md](../parser-ng/BULK.md) — what’s new in 2.0.5
11+
- [SIMD-EXAMPLES.md](../parser-ng/BULK.md) — what’s new in 2.0.7
1212

1313
---
1414

@@ -18,30 +18,28 @@ For examples and more information:
1818

1919
Executed on an Intel Core i5-1135G7 environment running a JDK 24 Early Access build.
2020

21-
| Operation | Matrix: $70 \times 70$ | Matrix: $100 \times 100$ | Matrix: $200 \times 200$ |
22-
| --- | --- | --- | --- |
23-
| **GELU** | 10.7 ns/elt ($52.5\,\mu\text{s}$) | 7.46 ns/elt ($74.6\,\mu\text{s}$) | 7.30 ns/elt ($292\,\mu\text{s}$) |
24-
| **SwiGLU** ||| 13.30 ns/elt ($530\,\mu\text{s}$) |
2521

26-
> 📊 **Note on Peak Efficiency:** An execution speed of `7.3 ns/element` for GELU translates to roughly 26 CPU cycles. This safely hits the theoretical throughput ceiling of what AVX2 combined with hardware `vdexp` intrinsics can process within a managed runtime.
22+
| Operation | Matrix Scale: 70 x 70 | Matrix Scale: 100 x 100 | Matrix Scale: 200 x 200 |
23+
| :--- | :--- | :--- | :--- |
24+
| **GELU** | 2.01 ns/elt (9.85μs) | 1.95 ns/elt (19.5μs) | **1.96 ns/elt** (78.4μs) |
25+
| **SwiGLU** | 1.57 ns | 1.57 ns | **1.54 ns/elt** (61.6μs) |
2726

27+
> 📊 **Peak Hardware Efficiency:** A measurement of `2.00 ns/element` for a complex activation function like GELU equates to roughly 8 raw CPU cycles. This securely reaches the physical throughput ceiling of what AVX2 vector units combined with hardware `vdexp` primitives can achieve in a managed code layer.
2828
#### Ecosystem Comparison ($40\text{k}$ Elements, 2 Cores)
2929

3030
| Library / Engine | GELU Execution Profile | Architectural Mechanism |
3131
| --- | --- | --- |
32-
| **parser-ng-simd** | **292 µs (7.3 ns/elt)** | **Pure Java Vector API (Direct SIMD)** |
32+
| **parser-ng-simd** | **292 µs (2.00 ns/elt)** | **Pure Java Vector API (Direct SIMD)** |
3333

3434

35-
*Data Scaling Boundary:* At extreme workloads (e.g., 67M+ records), computation throughput bounds shift toward physical DRAM bandwidth, where execution stabilizes at approximately `1.3x` faster than optimized scalar bytecode compilers.
36-
3735
---
3836

3937
### Key Architectural Pillars
4038

41-
1. **Tile-Based Workload Dispatch:** Compute tasks are split into deterministic block matrices (from $70 \times 70$ up to $200 \times 200$), ensuring data tiles remain completely resident within L1/L2 CPU caches while minimizing loop-bound orchestration overhead.
42-
2. **C2 Loop Fusion:** The engine collapses composite abstract syntax trees (ASTs) into unified native vector loops. Sequential steps like `exp + tanh + FMA` resolve into 3 to 4 hyper-optimized AVX2 machine instructions.
43-
3. **Pure Java Intrinsic Pipelines:** Built directly on JDK Vector API concepts (`FloatVector`, `VectorMask`), utilizing hardware-level primitive acceleration without relying on unsafe memory access blocks or third-party wrappers.
44-
4. **Zero-Allocation Hot Paths:** Execution tracks pre-allocated internal memory frames. Buffer reuse prevents heap churning, entirely insulating math execution paths from Garbage Collection (GC) pauses.
39+
40+
1. **C2 Loop Fusion:** The engine collapses composite abstract syntax trees (ASTs) into unified native vector loops. Sequential steps like `exp + tanh + FMA` resolve into 3 to 4 hyper-optimized AVX2 machine instructions.
41+
2. **Pure Java Intrinsic Pipelines:** Built directly on JDK Vector API concepts (`FloatVector`, `VectorMask`), utilizing hardware-level primitive acceleration without relying on unsafe memory access blocks or third-party wrappers.
42+
3. **Zero-Allocation Hot Paths:** Execution tracks pre-allocated internal memory frames. Buffer reuse prevents heap churning, entirely insulating math execution paths from Garbage Collection (GC) pauses.
4543

4644
---
4745

@@ -68,13 +66,13 @@ Include both the core module and the SIMD engine extension in your `pom.xml`:
6866
<dependency>
6967
<groupId>com.github.gbenroscience</groupId>
7068
<artifactId>parser-ng</artifactId>
71-
<version>2.0.0</version>
69+
<version>2.0.7</version>
7270
</dependency>
7371

7472
<dependency>
7573
<groupId>com.github.gbenroscience</groupId>
7674
<artifactId>parser-ng-simd</artifactId>
77-
<version>2.0.0</version>
75+
<version>2.0.7</version>
7876
</dependency>
7977
</dependencies>
8078
```
@@ -90,7 +88,7 @@ Out-of-the-box support includes: `gelu`, `swiglu`, `silu`, `tanh`, `exp`, `log`,
9088
To execute microbenchmarks and verify SIMD registration on your host architecture, use the following profile goal:
9189

9290
```bash
93-
mvn clean test -Dtest=VectorTurboEvaluatorTest
91+
mvn clean test -Dtest=SIMDTurboEvaluatorTest
9492

9593
```
9694

parser-ng-simd/dependency-reduced-pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<parent>
44
<artifactId>parser-ng-parent</artifactId>
55
<groupId>com.github.gbenroscience</groupId>
6-
<version>2.0.6</version>
6+
<version>2.0.7</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99
<artifactId>parser-ng-simd</artifactId>
1010
<name>ParserNG SIMD Extension</name>
1111
<description>Hardware-accelerated SIMD vector calculation pipelines for ParserNG
1212
Rich and Performant, Cross Platform Java Library(100% Java).No native dependencies.(e.g. JNI)
13-
Version 2.0.6 features updates to GeLU and SwiGLU for correctness
13+
Version 2.0.7 features updates to GeLU and SwiGLU for correctness
1414
For library support, customizations or donations, reach me at gbenroscience@gmail.com|+2348165779034</description>
1515
<url>https://github.com/gbenroscience/ParserNG</url>
1616
<build>

parser-ng-simd/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<parent>
99
<groupId>com.github.gbenroscience</groupId>
1010
<artifactId>parser-ng-parent</artifactId>
11-
<version>2.0.6</version>
11+
<version>2.0.7</version>
1212
<relativePath>../pom.xml</relativePath>
1313
</parent>
1414

@@ -18,7 +18,7 @@
1818
<description>
1919
Hardware-accelerated SIMD vector calculation pipelines for ParserNG
2020
Rich and Performant, Cross Platform Java Library(100% Java).No native dependencies.(e.g. JNI)
21-
Version 2.0.6 features updates to GeLU and SwiGLU for correctness
21+
Version 2.0.7 features updates to GeLU and SwiGLU for correctness
2222
For library support, customizations or donations, reach me at gbenroscience@gmail.com|+2348165779034
2323
</description>
2424
<url>https://github.com/gbenroscience/ParserNG</url>

parser-ng/BULK.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ParserNG 2.0.5
1+
# ParserNG 2.0.7
22

33
An ultra-high-performance mathematical expression parsing and evaluation engine for Java. Version 2.0.x introduces a breakthrough **Block Vectorization Engine** (`VectorTurboEvaluator`) and `SIMDVectorTurboEvaluator` powered by the Java **Vector API** (`jdk.incubator.vector`).
44

@@ -39,12 +39,12 @@ To use SIMDVectorTurboEvaluator(e.g. on modern servers(JDK 21+) and laptops(JDK2
3939
<dependency>
4040
<groupId>com.github.gbenroscience</groupId>
4141
<artifactId>parser-ng</artifactId>
42-
<version>2.0.5</version>
42+
<version>2.0.7</version>
4343
</dependency>
4444
<dependency>
4545
<groupId>com.github.gbenroscience</groupId>
4646
<artifactId>parser-ng-simd</artifactId>
47-
<version>2.0.5</version>
47+
<version>2.0.7</version>
4848
</dependency>
4949
```
5050

@@ -53,7 +53,7 @@ To use VectorTurboEvaluator(e.g. on Android and legacy systems supporting <JDK21
5353
<dependency>
5454
<groupId>com.github.gbenroscience</groupId>
5555
<artifactId>parser-ng</artifactId>
56-
<version>2.0.5</version>
56+
<version>2.0.7</version>
5757
</dependency>
5858
```
5959

0 commit comments

Comments
 (0)