Skip to content

Commit

Permalink
Merge pull request #91 from ikawaha/develop
Browse files Browse the repository at this point in the history
Performance tweak
  • Loading branch information
ikawaha authored Sep 14, 2016
2 parents 635700c + 6662ce0 commit 6ca4ad9
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions internal/dic/content_appengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,15 @@
package dic

import (
"bytes"
"strings"
)

func newContents(b []byte) [][]string {
rows := bytes.Split(b, []byte(rowDelimiter))
str := string(b)
rows := strings.Split(str, rowDelimiter)
m := make([][]string, len(rows))
for i, r := range rows {
cols := bytes.Split(r, []byte(colDelimiter))
m[i] = make([]string, len(cols))
for j, c := range cols {
m[i][j] = string(c)
}
m[i] = strings.Split(r, colDelimiter)
}
return m
}

0 comments on commit 6ca4ad9

Please sign in to comment.