Show HN: JNum – Pure Java 25 NumPy/BLAS via Project Panama FFM and Vector API gi...

@show

Show HN: JNum – Pure Java 25 NumPy/BLAS via Project Panama FFM and Vector API github.com · 2 points · 0 comments · HN thread

TL;DR JNum is a Show HN project: an open-source numerical computing library for Java 25 and Kotlin that aims to offer NumPy-like ergonomics and BLAS-class speed in pure Java, using Project Panama's Foreign Function & Memory API and the incubating Vector API. The author publishes benchmarks against NumPy, ND4J, EJML and ojAlgo claiming wins on many small and medium matrix operations. The post had 2 points and no comments at the time of capture.

  • Pure Java 25 and Kotlin library, no JNI or native C++ toolchain; the README says the JAR is about 470 KB versus 100+ MB for native-backed libraries like ND4J.
  • Uses off-heap memory via Project Panama (JEP 454) with 64-byte aligned tensors, and the Vector API (jdk.incubator.vector) for SIMD on AVX2, AVX-512 and ARM NEON.
  • Claims a 4-tier GEMM engine, zero-copy slicing and transposition, a symbolic eval() expression compiler, and Safetensors and .npy/.npz I/O.
  • Self-reported JMH benchmarks show JNum ahead of NumPy on some sizes (e.g. 11x on the smallest matrix, 3.8x on sigmoid) and roughly 88% of NumPy on the largest matmul, with the README claiming large speedups over EJML and ND4J.
  • Requires JDK 25, and compiling and running need --add-modules jdk.incubator.vector; runtime also needs --enable-native-access=ALL-UNNAMED.
  • Ships Maven and Gradle coordinates for version 0.2.0 and a multi-part documentation suite; licensed under Apache 2.0.

Discussion The thread has no comments yet, so there is no community discussion to summarize. The post has only its initial score of 2 points.

#java #numericalComputing #projectPanama #simd #showHN #kotlin