File tree Expand file tree Collapse file tree 4 files changed +39
-0
lines changed
Expand file tree Collapse file tree 4 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ * .test
2+ * .out
Original file line number Diff line number Diff line change 1+ package benches
2+
3+ import (
4+ "testing"
5+
6+ excelformulaparser "github.com/link-duan/excel-formula-parser"
7+ "github.com/xuri/efp"
8+ )
9+
10+ const benchFormula = `=+ AName- (-+-+-2^6) = {"A","B"} + @SUM(A1) + (@ERROR.TYPE(#VALUE!) = 2)`
11+
12+ func Benchmark_Parse (b * testing.B ) {
13+ for i := 0 ; i < b .N ; i ++ {
14+ excelformulaparser .NewParser (benchFormula ).Parse ()
15+ }
16+ }
17+
18+ func Benchmark_efp (b * testing.B ) {
19+ for i := 0 ; i < b .N ; i ++ {
20+ p := efp .ExcelParser ()
21+ p .Parse (benchFormula )
22+ }
23+ }
Original file line number Diff line number Diff line change 1+ module benches
2+
3+ go 1.24.3
4+
5+ require (
6+ github.com/link-duan/excel-formula-parser v1.0.0-alpha // indirect
7+ github.com/xuri/efp v0.0.1 // indirect
8+ )
9+
10+ replace github.com/link-duan/excel-formula-parser => ../
Original file line number Diff line number Diff line change 1+ github.com/link-duan/excel-formula-parser v1.0.0-alpha h1:4sPszJdMqfaRSOFCqa+3ozKD11u2zOtAAJZA665RS28 =
2+ github.com/link-duan/excel-formula-parser v1.0.0-alpha /go.mod h1:Vf4SsUVu/e/BF9ofoVa0NbiJmbfxaI/E0qHqX4k+WRw =
3+ github.com/xuri/efp v0.0.1 h1:fws5Rv3myXyYni8uwj2qKjVaRP30PdjeYe2Y6FDsCL8 =
4+ github.com/xuri/efp v0.0.1 /go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI =
You can’t perform that action at this time.
0 commit comments