Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastBytes 0.1.1 [ALPHA-2026-08-13] — High-performance SIMD-powered byte engine for Java

Status License: MIT Java Platform JitPack


⚡ 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.


FastBytes SIMD Performance Showcase


Quick Start — Example

import fastbytes.FastBytes;

public class Demo {
    public static void main(String[] args) {
        // 1. SIMD-Accelerated Byte Search (15x speedup over standard Java loops)
        byte[] data = "Hello World! FastBytes SIMD Engine Active.".getBytes();
        int index = FastBytes.indexOf(data, (byte) 'V');
        System.out.println("Found target byte at index: " + index);

        // 2. High-Speed SIMD Buffer Fill
        byte[] buffer = new byte[1024];
        FastBytes.fill(buffer, (byte) 0xFF);

        // 3. Fast 4K RGBA Video Frame Glitch XOR (100+ FPS)
        byte[] frameA = new byte[8294400]; // 4K RGBA Frame
        byte[] frameB = new byte[8294400];
        byte[] result = new byte[8294400];
        FastBytes.xor(frameA, frameB, result);
        System.out.println("4K Glitch XOR completed at 100+ FPS.");
    }
}

Table of Contents


Key Features

  • ⏱️ SIMD Copy: Up to 10x faster than System.arraycopy for 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.

📊 Performance (0.1.1)

Measured on Modern x64 Hardware (AVX-512BW enabled).

Operation Buffer Size Java (Standard) FastBytes (0.1.1) 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 PHILOSOPHY.md.


API Quick Reference

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.

Installation

Option 1: Maven (Recommended)

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 Engine -->
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>FastBytes</artifactId>
        <version>0.1.1</version>
    </dependency>

    <!-- FastSIMD Hardware Vector Engine -->
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>FastSIMD</artifactId>
        <version>0.1.1</version>
    </dependency>

    <!-- FastMemory Aligned Allocator -->
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>FastMemory</artifactId>
        <version>0.1.1</version>
    </dependency>

    <!-- FastPointer Primitive Address Wrapper -->
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>FastPointer</artifactId>
        <version>0.1.1</version>
    </dependency>

    <!-- FastCore Native Loader -->
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>FastCore</artifactId>
        <version>0.1.1</version>
    </dependency>
</dependencies>

Option 2: Gradle (via JitPack)

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.andrestubbe:FastBytes:0.1.1'
    implementation 'com.github.andrestubbe:FastSIMD:0.1.1'
    implementation 'com.github.andrestubbe:FastMemory:0.1.1'
    implementation 'com.github.andrestubbe:FastPointer:0.1.1'
    implementation 'com.github.andrestubbe:FastCore:0.1.1'
}

Option 3: Direct Download (No Build Tool)

Download the latest JARs directly to add them to your classpath:

  1. 📦 FastBytes-0.1.1.jar (Core Library)
  2. ⚡ FastSIMD-0.1.1.jar (Hardware Vector Engine)
  3. đź’ľ FastMemory-0.1.1.jar (32-Byte Aligned Allocator)
  4. 📍 FastPointer-0.1.1.jar (Native Primitive Pointer)
  5. ⚙️ fastcore-0.1.0.jar (Required Native JNI Loader)

Important

All JARs must be in your classpath for the native JNI calls to function correctly.


Technical Examples & Benchmarks

See the examples/Benchmark directory for technical implementations and official JMH benchmarks:

Benchmark Case Description Java Example JMH Benchmark
SIMD Search 3-Way Search (SIMD vs Prefetching vs Java) SearchRace.java JMH_Search.java
XOR Glitch 4K RGBA Video Frame XOR XorRace.java JMH_Xor.java
Bulk Copy Off-Heap Aligned Copy vs System.arraycopy CopyRace.java JMH_Copy.java

Run JMH Benchmarks via Script

run-benchmark.bat

Documentation

  • COMPILE.md: Full compilation guide (MSVC C++17 build chain + JNI Setup).
  • REFERENCE.md: Full API descriptions, border configurations, and codepoint index.
  • PHILOSOPHY.md: The engineering rationale for zero-allocation performance.
  • ROADMAP.md: Future milestones and planned features.

Platform Support

Platform Status
Windows 10/11 âś… Fully Supported
Linux đź”— Planned
macOS đź”— Planned

License

MIT License See LICENSE file for details.


Related Projects

  • FastSIMD — Hardware vector acceleration engine (AVX2, AVX-512, NEON)
  • FastMemory — SIMD 32-byte aligned off-heap memory allocation and page locking
  • FastPointer — Zero-overhead native address arithmetic
  • FastSharedMemory — Ultra-fast zero-copy IPC and shared memory mapped files
  • FastCore — Native JNI loader for FastJava libraries

Part of the FastJava Ecosystem — Making the JVM faster. Small package. Maximum speed. Zero bloat. 🚀📋

About

🧬 High‑performance SIMD byte engine for Java — AVX‑512/AVX2 accelerated copy, search, XOR, fill, and hashing with native intrinsics for real‑time data pipelines and large‑buffer processing.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages