gpt4 book ai didi

C/C++高频消息程序

转载 作者:太空宇宙 更新时间:2023-11-04 04:03:57 25 4
gpt4 key购买 nike

最近我遇到了 POCO 和 ACE 网络框架,以及我已经知道的 Boost。

我的问题是,这些库在传递消息方面是否比仅使用 Berkeley 套接字的常规 C 程序更快?这些库之所以受欢迎,仅仅是因为它们添加了多线程等有助于 boost 性能的功能吗?

我想在 Linux 上编写一个高性能的消息传递系统,但我不知道是否应该避免使用 ACE、POCO 和 Boost 而只是使用 Linux 线程操作系统函数和 berkeley 套接字?

换句话说,我不关心通用代码,使我的代码“STL 友好”等。我只想要原始性能(无需编写汇编!)。

最佳答案

你看过0MQ (aka ZeroMQ)了吗?然而?从他们的网站引用:

ØMQ \zeromq\:
 Ø  The socket library that acts as a concurrency framework.
 Ø  Faster than TCP, for clustered products and supercomputing.
 Ø  Carries messages across inproc, IPC, TCP, and multicast.
 Ø  Connect N-to-N via fanout, pubsub, pipeline, request-reply.
 Ø  Asynch I/O for scalable multicore message-passing apps.
 Ø  Large and active open source community.
 Ø  30+ languages including C, C++, Java, .NET, Python.
 Ø  Most OSes including Linux, Windows, OS X.
 Ø  LGPL free software with full commercial support from iMatix.

关于C/C++高频消息程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8370946/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com