Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

performance optimization & bugfix #50

Merged
merged 4 commits into from
Jun 14, 2020
Merged

Conversation

d-g-laptev
Copy link
Contributor

Before:

Benchmark:

pkg: github.com/antchfx/xpath
Benchmark_NormalizeSpaceFunc-4    478104	     2441 ns/op	    305 B/op	      9 allocs/op
Benchmark_ConcatFunc-4           3489579	     346 ns/op	    194 B/op	      10 allocs/op
PASS

Test: (unicode space "\u00a0" wasn't processed correctly)

=== RUN   Test_NormalizeSpaceFunc
--- FAIL: Test_NormalizeSpaceFunc (0.00s)
    func_test.go:25: unexpected result 'loooooooonnnnnnngggggggg tes   t strin  g'
FAIL

After:

Benchmark:

pkg: github.com/antchfx/xpath
Benchmark_NormalizeSpaceFunc-4   2447773	      453 ns/op	    240 B/op	      4 allocs/op
Benchmark_ConcatFunc-4           4704387	      250 ns/op	    152 B/op	      8 allocs/op
PASS

Test:

=== RUN   Test_NormalizeSpaceFunc
--- PASS: Test_NormalizeSpaceFunc (0.00s)
PASS

@coveralls
Copy link

coveralls commented Jun 13, 2020

Coverage Status

Coverage increased (+0.4%) to 76.112% when pulling 31b43ad on d-g-laptev:master into 51d8936 on antchfx:master.

@zhengchun zhengchun merged commit 070fdf4 into antchfx:master Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants