[hexxy] DEV branch - extremely speed up hex encoding

This commit is contained in:
mizi 2024-02-01 16:23:15 -09:00
parent c5c01b4f77
commit b05f72ab50

View file

@ -7,7 +7,6 @@ import (
"io"
"log"
"os"
"runtime/pprof"
"strconv"
"github.com/jessevdk/go-flags"
@ -277,7 +276,6 @@ func XXD(r io.Reader, w io.Writer, filename string, color *Color) error {
} else {
w.Write(char)
}
c++
if k == octs*groupSize {
@ -462,12 +460,6 @@ func main() {
Debug = log.Printf
}
f, err := os.Create("mem.cpu")
defer f.Close()
pprof.StartCPUProfile(f)
defer pprof.StopCPUProfile()
if err := Hexxy(args); err != nil {
log.Fatal(err)
}