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

Misc #85

Closed
wants to merge 4 commits into from
Closed

Misc #85

wants to merge 4 commits into from

Conversation

ice1000
Copy link
Contributor

@ice1000 ice1000 commented Feb 21, 2020

=w=

@ice1000 ice1000 requested a review from Him188 Feb 21, 2020
Copy link
Member

@Him188 Him188 left a comment

See comments

@ice1000
Copy link
Contributor Author

ice1000 commented Feb 26, 2020

根据 qq 群的讨论,决定把所有 forEach 换成 asSequence().forEach 而不是把 asSequence 改成 forEach 以便复用标准库的全套 API……

@ice1000
Copy link
Contributor Author

ice1000 commented Feb 26, 2020

Review? @Him188

@Him188
Copy link
Member

Him188 commented Feb 26, 2020

经测试(10k个元素, 获取100次最后一个元素统计用时毫秒), asSequence 要慢三倍.

foreach: 7
asSequence: 24
foreach: 6
asSequence: 21
foreach: 5
asSequence: 16
foreach: 5
asSequence: 14
foreach: 5
asSequence: 15
foreach: 5
asSequence: 14
foreach: 6
asSequence: 14
foreach: 4
asSequence: 15
foreach: 5
asSequence: 16

在实际使用中一个ContactList 会有 2k 个元素.
3 倍性能和 1 行复用, 是否选择性能会更好呢

我记得群里讨论结果是保留现有...
@ice1000

@ice1000
Copy link
Contributor Author

ice1000 commented Feb 26, 2020

嗯,那算了吧 (记忆出现了偏差

@ice1000 ice1000 closed this Feb 26, 2020
@Him188
Copy link
Member

Him188 commented Feb 26, 2020

无论如何还是谢谢

mrhso pushed a commit to mrhso/mirai-moritaka that referenced this issue Jan 28, 2021
"帮主" -> "帮助"
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.

None yet

2 participants