diff options
author | Ted <37789839+Theodoree@users.noreply.github.com> | 2020-11-03 17:48:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-03 17:48:37 +0800 |
commit | fcca8a38389c7a7f99639dc142b9b10c827ac7ce (patch) | |
tree | aa0e2f264153a793f1157c23959a9c140fa1bf67 /lib.go | |
parent | 9d470bb38f992d9f0da2168b7a576f9e212b7a88 (diff) |
optimize memory allocation (#722)
* optimize marshal
* optimize mem alloc
* add benchmark testing
* add NewSheetWithRowNum testing
* sync struct fields order
* add BenchmarkNewSheetWithStreamWriter
* delete NewSheetWithRowNum and benchmark test
Diffstat (limited to 'lib.go')
-rw-r--r-- | lib.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -206,8 +206,9 @@ func CoordinatesToCellName(col, row int) (string, error) { if col < 1 || row < 1 { return "", fmt.Errorf("invalid cell coordinates [%d, %d]", col, row) } + //Using itoa will save more memory colname, err := ColumnNumberToName(col) - return fmt.Sprintf("%s%d", colname, row), err + return colname + strconv.Itoa(row), err } // boolPtr returns a pointer to a bool with the given value. |