Closed magnus-ISU closed 1 year ago
Wait I'm an idiot. I think clolcat
is detecting that hyperfine is rerouting its stdout and then not doing anything. clolcat|cat
isn't colored and is much faster. Using time
manually gives both programs taking about the same, lolcat
700ms and clolcat
600ms.
So I was quite pleased with myself that this implementation is much faster than other rust
lolcat
s. ButThat's not good. We can probably do a lot better.
clolcat
does not handle any escape sequences and so there are reasons to prefer going slower. But they're probably doing something quite clever which, especially when printing files and not stdin, I want to look into.