Skip to content

Commit fb75854

Browse files
committed
docs: finalize COMPILE.md and tailored PHILOSOPHY.md
1 parent a5698d7 commit fb75854

2 files changed

Lines changed: 69 additions & 22 deletions

File tree

docs/COMPILE.md

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,60 @@
1-
# FastImage Compilation Guide
1+
# Building FastImage 🛠️
22

3-
## Native C++ MSVC AVX2 Build Chain
3+
Complete build guide for compiling the native C++ AVX2 SIMD image processing engine and packaging the Java JAR.
44

5-
1. Requirements: Visual Studio 2022 / 2026 with "Desktop development with C++" and JDK 17+.
6-
2. Open Developer Command Prompt or PowerShell in the repository root.
7-
3. Run the automated native compilation script:
5+
---
6+
7+
## Prerequisites
8+
9+
* **Windows 10 or 11 (64-bit)**
10+
* **JDK 17+** ([Eclipse Adoptium](https://adoptium.net/) or [Oracle JDK](https://www.oracle.com/java/technologies/downloads/))
11+
* **Visual Studio 2022 or 2026** (Community, Professional, or Enterprise) with "Desktop development with C++" workload
12+
* **Windows 10/11 SDK** (installed with Visual Studio)
13+
* **Maven 3.9+**
14+
15+
---
16+
17+
## Automated One-Click Build
18+
19+
FastImage provides an automated build script with Visual Studio and JDK discovery:
820

921
```cmd
22+
# In the FastImage repository root:
1023
compile.bat
1124
```
1225

13-
This compiles `fastimage.dll` with MSVC AVX2 flags (`/arch:AVX2 /O2 /D_CRT_SECURE_NO_WARNINGS`) and copies the output DLL to `src/main/resources/native/` and `src/main/resources/win32-x86-64/`.
26+
What `compile.bat` does automatically:
27+
1. Detects Visual Studio 2026 / 2022 Community via `vswhere.exe`.
28+
2. Sets up the 64-bit developer environment (`vcvars64.bat`).
29+
3. Compiles `src/main/native/fastimage.cpp` with MSVC AVX2 flags:
30+
- `/O2` (maximum speed)
31+
- `/arch:AVX2` (256-bit SIMD vectorization)
32+
- `/D_CRT_SECURE_NO_WARNINGS`
33+
4. Automatically copies `fastimage.dll` to:
34+
- `src/main/resources/native/fastimage.dll`
35+
- `src/main/resources/win32-x86-64/fastimage.dll`
36+
- `%USERPROFILE%\.fastcore\native\fastimage\fastimage.dll`
37+
38+
---
39+
40+
## Maven Java Packaging
41+
42+
Once the native DLL is compiled, build and install to your local Maven repository:
43+
44+
```bash
45+
# Build and install to ~/.m2/repository
46+
mvn clean install -DskipTests
47+
```
48+
49+
---
50+
51+
## JMH Benchmarking
52+
53+
To build and execute the official JMH benchmark suite:
54+
55+
```cmd
56+
run-benchmark.bat
57+
```
58+
59+
---
60+
**Part of the FastJava Ecosystem***Making the JVM faster. ⚡*

docs/PHILOSOPHY.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
# The Philosophy of FastXXX
1+
# The Philosophy of FastImage 💡
22

33
> [!IMPORTANT]
44
> **"Keine Kopien. Niemals. Kritischer JNI-Pfad. Native-First Performance."**
55
6-
FastXXX is built on the principle that modern Java applications require **native-first** acceleration for performance-critical operations that the standard JVM APIs don't fully optimize.
6+
FastImage is built on the conviction that 2D image processing, UI blurring, and computer vision pipelines in Java must never be crippled by JVM heap allocations, garbage collection stalls, or slow scalar rasterizers.
77

88
## Core Tenets
99

10-
1. **Native-First Execution**
11-
Bypass standard Java layers to reach the physical limits of the hardware using hand-tuned C++ and SIMD intrinsics.
10+
1. **Native-First SIMD Execution**
11+
Bypass standard Java2D and `BufferedImage` software loops to reach physical CPU limits using hand-tuned C++ with 256-bit AVX2 vector intrinsics.
1212

13-
2. **Zero-Copy JNI Architecture**
14-
Minimize JNI transition costs by using direct memory access patterns and avoiding implicit memory copies between the JVM and the native layer.
13+
2. **Off-Heap Zero-GC Architecture**
14+
Maintain pixel buffers strictly in native unmanaged memory. Zero JVM Garbage Collection pauses even when processing uncompressed 1080p and 4K frames at 60+ FPS.
1515

16-
3. **Deterministic Latency**
17-
Eliminate variance caused by JIT warm-up or garbage collection stalls in critical hot-paths.
16+
3. **Zero-Copy Foreign Buffer Interop**
17+
Seamlessly wrap raw 64-bit pointers, `FastPointer` handles, and `DirectByteBuffer` allocations from sibling modules (`FastScreen`, `FastCamera`, `FastRobot`) without duplicating memory.
1818

19-
4. **Hardware-Aware Optimization**
20-
Leverage modern CPU features (AVX, SSE, NEON) to process data at hardware-native speeds.
19+
4. **Hardware-Grade Filtering Algorithms**
20+
Provide modern GPU-grade blur (Dual-Kawase) and box area-average downsampling in native CPU kernels for high-quality UI overlays and downscaling without aliasing artifacts.
2121

22-
5. **Blueprint Consistency**
23-
As part of the **FastJava** ecosystem, FastXXX adheres to a standardized architecture:
24-
* **Native Backend**: Direct C++ implementation.
25-
* **Unified Loading**: Powered by `FastCore`.
26-
* **Premium Quality**: Built for high-performance systems and autonomous agents.
22+
5. **FastJava Blueprint Consistency**
23+
As part of the **FastJava** ecosystem:
24+
* **Native Backend**: Direct C++ implementation with AVX2 optimizations.
25+
* **Unified Loading**: Powered by `FastCore` for zero-dependency native deployment.
26+
* **Production Quality**: High-performance, clean chaining API, and thorough JMH profiling.
2727

2828
---
29-
**FastXXX — Powering the next generation of Native Java.**
29+
**FastImage — Powering the next generation of Native Java.**

0 commit comments

Comments
 (0)