-
Rob Pike authored
Instead of scanning the text to count newlines, which is n², keep track as we go and store the line number in the token. benchmark old ns/op new ns/op delta BenchmarkParseLarge-4 1589721293 38783310 -97.56% Fixes #17851 Change-Id: I231225c61e667535e2ce55cd2facea6d279cc59d Reviewed-on: https://go-review.googlesource.com/33234 Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
24a088d2
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
parse | ||
testdata | ||
doc.go | ||
example_test.go | ||
examplefiles_test.go | ||
examplefunc_test.go | ||
exec.go | ||
exec_test.go | ||
funcs.go | ||
helper.go | ||
multi_test.go | ||
option.go | ||
template.go |