• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

enetx / g / 22200209868
89%

Build:
DEFAULT BRANCH: main
Ran 19 Feb 2026 09:12PM UTC
Jobs 1
Files 50
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Feb 2026 09:08PM UTC coverage: 89.376% (-0.4%) from 89.809%
22200209868

push

github

enetx
perf: reduce allocations across string, collection, and encoding types

string:
- Lower/Upper/IsLower/IsUpper/IsTitle: Bytes() → BytesUnsafe()/StringUnsafe()
- Random: ASCII fast-path with WriteByte, avoid global charset Runes() alloc
- ReplaceNth: Builder instead of triple string concatenation
- Chunks: ASCII fast-path (zero-copy slicing); Unicode path via
  utf8.DecodeRuneInString, eliminating []rune alloc and per-chunk String([]rune) alloc
- Truncate: ASCII fast-path + single-pass Unicode walk; drop LenRunes()+Runes() double scan
- Center: cache s.LenRunes() and pad.LenRunes() (4 scans → 2)
- writePadding: ASCII fast-path with WriteByte; non-ASCII via utf8.DecodeRuneInString,
  eliminating pad.Runes() alloc on every call
- Reverse: BytesUnsafe()/StringUnsafe()
- Similarity: plain []int for DP table, min() builtins

string/hash: BytesUnsafe()/StringUnsafe() for MD5/SHA1/SHA256/SHA512

string/encode:
- Base64/JSON: BytesUnsafe() to avoid copy
- URL: Grow() pre-allocation
- Hex: inline lookup table — zero per-byte allocs (was: strconv.FormatInt per byte)
- Binary: inline bit shift — zero per-byte allocs (was: fmt.Sprintf per byte)
- Octal: strconv.AppendInt into stack buffer — zero per-rune allocs

string/compress: all five writers use BytesUnsafe() instead of io.WriteString
  (io.WriteString on non-StringWriter falls back to []byte(s) copy)

int: Hex/Octal use strconv.FormatInt instead of fmt.Sprintf

set/map/map_ordered: simplify NewX size param (drop Slice[Int] unwrap indirection)

String() methods: add Grow() pre-allocation to Slice, Set, Map, MapOrd,
  MapSafe, Heap, Deque (n*8 or n*16 estimate reduces realloc churn)

slice: Join pre-computes exact size and uses a single strings.Builder,
  eliminating intermediate []string allocation

133 of 164 new or added lines in 12 files covered. (81.1%)

9 existing lines in 4 files now uncovered.

5325 of 5958 relevant lines covered (89.38%)

14237.01 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
92.31
-1.71% int.go
30
88.14
-7.22% string.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
92.31
-1.71% int.go
2
58.51
-2.13% float.go
2
86.21
-0.16% slice.go
4
88.14
-7.22% string.go
Jobs
ID Job ID Ran Files Coverage
1 22200209868.1 19 Feb 2026 09:12PM UTC 50
89.38
GitHub Action Run
Source Files on build 22200209868
  • Tree
  • List 50
  • Changed 11
  • Source Changed 0
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 3d692304 on github
  • Prev Build on refs/tags/v1.0.213 (#22176185119)
  • Next Build on main (#22233454591)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc