Skip to content

Speed up bytesToHexString with a lookup table - #270

Merged
ic0ns merged 2 commits into
mainfrom
fix/hex-string-perf
Nov 10, 2026
Merged

ic0ns merged 2 commits into
mainfrom
fix/hex-string-perf

Conversation

@face-al

@face-al face-al commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Closes #269

Replaces String.format per byte with a hex lookup table and presized StringBuilder. Output unchanged; all tests pass. Together with the asn1-attacker change, TLS-Scanner bulk scans went from 803 s to 440 s average per host with identical results.

@face-al
face-al requested a review from mmaehren November 6, 2026 07:10
@ic0ns
ic0ns merged commit 5b03376 into main Nov 10, 2026
13 checks passed
@ic0ns
ic0ns deleted the fix/hex-string-perf branch November 10, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bytesToHexString is slow (String.format per byte)

2 participants