C 数据结构还是核心基础?

发布于 2024-10-01 07:27:45 字数 1431 浏览 0 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

爱的故事 2024-10-08 07:27:45

这几乎是常识:当 Core Foundation 提供您需要的功能时,请使用它。当未提供适当的内容时,请使用您自己的数据结构。

It's pretty much common sense: Use Core Foundation when it provides the functionality you need. Use your own data structures when something appropriate has not been provided.

爱*していゐ 2024-10-08 07:27:45

我认为这有点取决于应用程序的具体要求。 如果您最终花费太多时间实现 C 数据结构而不是解决实际问题,那么最好的选择是使用现有的数据结构

此外,好的库中的数据结构通常都经过良好的测试,可以节省大量调试时间。

然而,例如,如果您正在考虑研究红黑树算法的特定行为来解决您的问题,那么您确实应该更好地编写自己的版本。

I think it depends a bit on the specific requirements of the application. If you end up spending too much time implementing the C data structure instead of working on the actual problem, then your best bet is to work with an already existing data structure.

Also, data structures from a good library are generally well tested and can save you a lot of debugging time.

However if, for example, you are thinking in working on a specific behavior of a red black tree algorithm in order to tackle your problem, then indeed you should better write your own version.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文