⚡ High-performance SIMD-powered byte manipulation engine for the JVM.
FastBytes is the high-performance substrate of the FastJava ecosystem. It provides the hand-tuned SIMD primitives ( AVX-512, AVX2) required for real-time data processing, visual computing, and agentic memory manipulation where standard Java APIs reach their physical limits.
- Key Features
- Performance
- API Quick Reference
- Installation
- Technical Examples & Hero Demos
- Documentation
- Platform Support
- License
// Quick Start — SIMD Search
byte[] data = ...; // 500MB buffer
int index = FastBytes.indexOf(data, (byte) 0x42); - ⚡ SIMD Copy: Up to 10x faster than
System.arraycopyfor large blocks. - 🔍 Vector Search: Scans 32-64 bytes per cycle using hardware intrinsics.
- 🎨 Native XOR: Optimized for cryptographic and visual processing.
- 📦 Zero Dependencies: Purely native acceleration via JNI.
Measured on Modern x64 Hardware (AVX-512BW enabled).
| Operation | Buffer Size | Java (Standard) | FastBytes (v0.1.0) | Speedup |
|---|---|---|---|---|
| XOR | 4K Frame | ~52 ms | ~2 ms | 26x |
| Search | 500 MB | ~215 ms | ~30 ms | 7.2x |
| Copy | 1 GB | ~170 ms | ~118 ms | 1.4x |
| Fill | 1 GB | ~110 ms | ~85 ms | 1.3x |
Read the full manifest in PHILOSOPHIE.md.
- Kernel Fastpaths: DMA-based bulk copying (
CopyFile2). - 3-Way Fill: Hardware-optimized memory zeroing.
- Apple Silicon: Native NEON port for ARM64.
See the full ROADMAP.md for details.
| Method | Description | Path |
|---|---|---|
copy(...) |
High-speed memory migration (64-byte unrolled). | Reference → |
indexOf(...) |
AVX-512 accelerated byte scanner. | Reference → |
xor(...) |
128-byte vector XOR engine (Visual/Crypto). | Reference → |
fill(...) |
Rapid buffer zeroing/initialization. | Reference → |
hashXXH32(...) |
SIMD-ready xxHash implementation. | Reference → |
Tip
See REFERENCE.md for full JNI contracts and fallback rules.
Add the JitPack repository and the dependencies to your pom.xml:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<!-- FastBytes Library -->
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>fastbytes</artifactId>
<version>v0.1.0</version>
</dependency>
<!-- FastCore (Required Native Loader) -->
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>fastcore</artifactId>
<version>v0.1.0</version>
</dependency>
</dependencies>repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.andrestubbe:fastbytes:v0.1.0'
implementation 'com.github.andrestubbe:fastcore:v0.1.0'
}Download the latest JARs directly to add them to your classpath:
- 📦 **fastbytes-v0.1.0.jar ** (The Core Library)
- ⚙️ fastcore-v0.1.0.jar ( The Mandatory Native Loader)
Important
All JARs must be in your classpath for the native JNI calls to function correctly.
See the examples/ directory for technical implementations and high-speed races:
| Case | Java Example | Performance Race / Demo | JMH Benchmark |
|---|---|---|---|
| XOR | XorRace.java | “Real-Time XOR Visualizer” (4K @ 666 FPS) | JMH_Xor.java |
| Search | SearchRace.java | “SIMD Search vs Java Loop” (7.2x speedup) | JMH_Search.java |
| Copy | CopyRace.java | “1GB Copy Race” (1.4x speedup) | JMH_Copy.java |
| Fill | FillRace.java | “1GB Zero-Fill Race” (1.3x speedup) | JMH_Fill.java |
| Hash | HashRace.java | “100MB xxHash Battle” (xxHash32 Speed) | JMH_Hash.java |
- COMPILE.md: Full compilation guide (MSVC C++17 build chain + JNI Setup).
- REFERENCE.md: Full API descriptions, border configurations, and codepoint index.
- PHILOSOPHIE.md: The engineering rationale for zero-allocation performance.
- ROADMAP.md: Future milestones and planned features.
| Platform | Status |
|---|---|
| Windows 10/11 | ✅ Fully Supported |
| Linux | 🚧 Planned |
| macOS | 🚧 Planned |
MIT License — See LICENSE file for details.
- FastFileIndex - Binary file indexing with mmap support
- FastFileSearch - Prefix Trie, N-Gram index, and Ranking engine
- FastFileWatch - USN Journal-based live file monitoring
- FastCore - Unified JNI loader and platform abstraction
Part of the FastJava Ecosystem — Making the JVM faster. Small package. Maximum speed. Zero bloat. 🚀📋
