andrestubbe/FastASCII.git
https://github.com/andrestubbe/FastASCII
Adds FastQuadrant and FastSextant as alternative to FastBraille
|
|
8 stundas atpakaļ | |
|---|---|---|
| .github | 1 mēnesi atpakaļ | |
| docs | 2 mēneši atpakaļ | |
| examples | 8 stundas atpakaļ | |
| native | 2 mēneši atpakaļ | |
| src | 2 nedēļas atpakaļ | |
| .gitattributes | 2 mēneši atpakaļ | |
| .gitignore | 2 mēneši atpakaļ | |
| LICENSE | 2 mēneši atpakaļ | |
| README.md | 2 mēneši atpakaļ | |
| compile.bat | 2 mēneši atpakaļ | |
| jitpack.yml | 2 mēneši atpakaļ | |
| pom.xml | 1 mēnesi atpakaļ | |
| run-benchmark.bat | 2 mēneši atpakaļ | |
| run-demo-braillie.bat | 1 mēnesi atpakaļ | |
| run-demo.bat | 1 mēnesi atpakaļ | |
| run-speed.bat | 1 mēnesi atpakaļ |
⚡ A high-performance, zero-allocation byte processing library for Java, engineered for direct manipulation of primitive byte arrays without the devastating overhead of String instantiation or UTF-16 transcoding.
FastASCII is the foundational byte-level standard library for the FastJava ecosystem.
To achieve a completely responsive, zero-latency parsing and rendering experience, FastASCII is the invisible backbone designed to power the rest of the FastJava ecosystem:
// Quick Start — Example
import fastascii.FastASCIIWriter;
import fastascii.FastASCIIReader;
public class Demo {
public static void main(String[] args) {
byte[] buffer = new byte[1024];
// Write integers directly to bytes (Zero Allocation!)
int bytesWritten = FastASCIIWriter.writeInt(buffer, 0, 404);
// Write UTF-8 codepoints natively
bytesWritten += FastASCIIWriter.writeUtf8(buffer, bytesWritten, 0x1F680); // 🚀
// Parse unsigned integers blazingly fast
int parsed = FastASCIIReader.parseUInt(buffer, 0, 3);
System.out.println("Parsed: " + parsed);
}
}
The mission is to build the fastest, most robust byte manipulation kernel on the JVM. Java's standard library forces expensive String allocations and UTF-8 to UTF-16 conversions that destroy performance in hot loops. FastASCII operates exclusively on primitives, empowering developers to create parsers and renderers that redefine Java performance by pushing the absolute limits of the HotSpot JIT compiler.
String, StringBuilder, and Matcher instantiations.indexOf, whitespace skipping, and integer parsing.| Method | Description | Component |
|---|---|---|
writeInt(buffer, offset, value) |
Writes an integer directly into a byte buffer. | FastASCIIWriter |
writeUtf8(buffer, offset, cp) |
Encodes a codepoint directly to UTF-8 bytes. | FastASCIIWriter |
parseUInt(buffer, start, end) |
Blazing fast unsigned integer parsing from bytes. | FastASCIIReader |
find(haystack, offset, len, needle) |
Zero-allocation indexOf replacement. |
FastASCIIScanner |
decodeCodePoint(buf, off, len, out) |
High-throughput UTF-8 to UTF-32 decoding. | FastUTF8 |
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>
<!-- FastASCII Library -->
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>fastascii</artifactId>
<version>0.1.0</version>
</dependency>
</dependencies>
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.andrestubbe:fastascii:0.1.0'
}
Download the latest JARs directly to add them to your classpath:
MIT License — See LICENSE file for details.
Part of the FastJava Ecosystem — Making the JVM faster. Small package. Maximum speed. Zero bloat. 🚀💎