From 0ea66329b84cc6e4f8ff61ee99c00bb238070247 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 2 Aug 2015 14:00:18 +0900 Subject: Performance tuning - eager rune array conversion > wc -l /tmp/list2 2594098 /tmp/list2 > time cat /tmp/list2 | fzf-0.10.1-darwin_amd64 -fqwerty > /dev/null real 0m5.418s user 0m10.990s sys 0m1.302s > time cat /tmp/list2 | fzf-head -fqwerty > /dev/null real 0m4.862s user 0m6.619s sys 0m0.982s --- src/ansi_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ansi_test.go') diff --git a/src/ansi_test.go b/src/ansi_test.go index d4d3ca1e..e278fe98 100644 --- a/src/ansi_test.go +++ b/src/ansi_test.go @@ -17,9 +17,9 @@ func TestExtractColor(t *testing.T) { var state *ansiState clean := "\x1b[0m" check := func(assertion func(ansiOffsets []ansiOffset, state *ansiState)) { - output, ansiOffsets, newState := extractColor(&src, state) + output, ansiOffsets, newState := extractColor(src, state) state = newState - if *output != "hello world" { + if output != "hello world" { t.Errorf("Invalid output: {}", output) } fmt.Println(src, ansiOffsets, clean) -- cgit v1.2.3