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

有没有必要做内存池 #1683

Open
jiangbing321 opened this issue Jan 10, 2025 · 1 comment
Open

有没有必要做内存池 #1683

jiangbing321 opened this issue Jan 10, 2025 · 1 comment

Comments

@jiangbing321
Copy link

No description provided.

@Barenboim
Copy link
Contributor

简单来讲,没有必要。

我们的内存分配释放都是跨线程的,实现内存池需要把标准的malloc的代码都实现一遍。而且会导致代码可读性变得很差。

可能的内存优化,是复用task的内存,不要每次分配释放。但我们实验过基本也没有什么影响,只有那种节点都非常简单的DAG,运行很多次才能看出区别。

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