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