[feature] Performance optimizations and benchmark#70
Merged
StellaLupus merged 3 commits intomainfrom Apr 21, 2026
Merged
Conversation
Collaborator
StellaLupus
commented
Apr 15, 2026
- KotlinEngine: pre-compile regex patterns once at init instead of per scan (~46% faster)
- Matchers: move per-call regex/list constructions to object-level constants
- CardBins: List -> Set for O(1) BIN lookup
- HyperScanEngine: drop unnecessary toMutableList() conversion
- Add BenchmarkTest covering scan throughput, init speed and match consistency
- CI: post benchmark results as PR comment via actions/github-script
- KotlinEngine: pre-compile regex patterns once at init instead of per scan (~46% faster) - Matchers: move per-call regex/list constructions to object-level constants - CardBins: List -> Set for O(1) BIN lookup - HyperScanEngine: drop unnecessary toMutableList() conversion - Add BenchmarkTest covering scan throughput, init speed and match consistency - CI: post benchmark results as PR comment via actions/github-script
Benchmark ResultsScan ThroughputCorpus:
Init SpeedMatchers: 65 | Warmup: 1 | Iterations: 5
Pre-compiled DB speedup: 172.6x Match Consistency (
|
| Engine | Matches |
|---|---|
KotlinEngine |
42 |
HyperScanEngine |
42 |
HyperScan(preload) |
42 |
equal | preload matches compile
added 2 commits
April 15, 2026 18:24
…tabase Avoid expensive regex compilation on startup by allowing the engine to save and load a compiled Hyperscan database (ByteArray, InputStream, File). A SHA-256 manifest ensures strict matcher/config compatibility on load. Benchmarks show ~192x init speedup with identical scan results. Made-with: Cursor
|
✅ SNAPSHOT published. Published version: Gradle: dependencies { implementation("org.angryscan:core:1.5.0-SNAPSHOT") }Maven: <dependency>
<groupId>org.angryscan</groupId>
<artifactId>core</artifactId>
<version>1.5.0-SNAPSHOT</version>
</dependency>Commit: |
gammmaaaa
approved these changes
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.