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

albertito / chasquid / 11612545642
95%
main: 95%

Build:
Build:
LAST BUILD BRANCH: refs/tags/v1.17.0
DEFAULT BRANCH: main
Ran 31 Oct 2024 01:12PM UTC
Jobs 1
Files 45
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

31 Oct 2024 01:10PM UTC coverage: 94.897% (+0.03%) from 94.866%
11612545642

push

albertito
normalize: Improve ToCRLF/StringToCRLF performance

The ToCRLF/StringToCRLF functions are not very performance critical, but
we call it for each mail, and the current implementation is very
inefficient (mainly because it goes one byte at a time).

This patch replaces it with a better implementation that goes line by line.

The new implementation of ToCRLF is ~40% faster, and StringToCRLF is ~60%
faster.

```
$ benchstat old.txt new.txt
goos: linux
goarch: amd64
pkg: blitiri.com.ar/go/chasquid/internal/normalize
cpu: 13th Gen Intel(R) Core(TM) i9-13900T
                │    old.txt    │               new.txt                │
                │    sec/op     │    sec/op     vs base                │
ToCRLF-32         162.96µ ±  6%   95.42µ ± 12%  -41.44% (p=0.000 n=10)
StringToCRLF-32   190.70µ ± 14%   76.51µ ±  6%  -59.88% (p=0.000 n=10)
geomean            176.3µ         85.44µ        -51.53%
```

46 of 46 new or added lines in 1 file covered. (100.0%)

5728 of 6036 relevant lines covered (94.9%)

65787.92 hits per line

Jobs
ID Job ID Ran Files Coverage
1 11612545642.1 31 Oct 2024 01:12PM UTC 45
94.9
Source Files on build 11612545642
  • Tree
  • List 45
  • Changed 9
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 41bb7b6f on github
  • Prev Build on next (#9034770918)
  • Next Build on next (#12109450277)
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