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

Replace map with circular array #152

Open
Cczzzz opened this issue May 30, 2022 · 1 comment
Open

Replace map with circular array #152

Cczzzz opened this issue May 30, 2022 · 1 comment

Comments

@Cczzzz
Copy link
Contributor

Cczzzz commented May 30, 2022

使用环形数组替换 map ,以提高性能。
另外在多线程写入,非公平锁下,会出现 23456789 1 的顺序写入消息,导致23456789 都会等待第1条,
我测试下 1w tps 最多同时堵塞超过 300 条消息。

@tsunghanjacktsai
Copy link
Contributor

tsunghanjacktsai commented Jun 14, 2022

By which places you'd like to replace circular arrays over maps? Welcome to open a PR for this :-)

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

No branches or pull requests

2 participants