Skip to content

Conversation

@jxs1211
Copy link

@jxs1211 jxs1211 commented Jul 15, 2022

Pre-Checklist

Note: please complete ALL items in the following checklist.

  • I have read through the CONTRIBUTING.md documentation.
  • My code has the necessary comments and documentation (if needed).
  • I have added relevant tests

Description

After investigation and testing, there is a place that could be improved for better performance.

Related Issues

see #833 for more details

New Behavior (screenshots if needed)

before improvement:

goos: linux
goarch: amd64
pkg: github.com/devstream-io/devstream/pkg/util/mapz
cpu: Intel(R) Xeon(R) CPU E5-1650 0 @ 3.20GHz
BenchmarkFillMapWithStrAndError-12         92894             13964 ns/op           10170 B/op          9 allocs/op
PASS
ok      github.com/devstream-io/devstream/pkg/util/mapz 2.378s

after improvement:

goos: linux
goarch: amd64
pkg: github.com/devstream-io/devstream/pkg/util/mapz
cpu: Intel(R) Xeon(R) CPU E5-1650 0 @ 3.20GHz
BenchmarkFillMapWithStrAndError-12        157182              6585 ns/op            5401 B/op          3 allocs/op
PASS
ok      github.com/devstream-io/devstream/pkg/util/mapz 1.130s

@jxs1211 jxs1211 requested a review from a team as a code owner July 15, 2022 06:52
@daniel-hutao daniel-hutao requested a review from xavier-hou July 15, 2022 07:27
…ng test case

Signed-off-by: xian-jie.shen <327411586@qq.com>
@jxs1211 jxs1211 force-pushed the perf-improvement branch from 4aa8c89 to 7a73fc3 Compare July 20, 2022 04:46
@xavier-hou xavier-hou merged commit 3b49ab4 into devstream-io:main Jul 20, 2022
@xavier-hou
Copy link
Member

@jxs1211 Many thanks to the unit test and performance imporvement!

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