在 x86_64/linux 上比 glibc 更快的数学库?
对于 x86_64-linux,是否有 glibc 的 libm(和标头?)的直接替代品,速度更快?
Is there a drop-in replacement to glibc's libm (and headers?) for x86_64-linux that is faster?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
与 ICC 一起分发的数学库对于许多 libm 函数来说要快得多,但确实需要购买 ICC。我相信如果您对此感到好奇,可以下载免费试用版。我知道他们支持 Linux,并且相信他们会尝试与 GCC 库直接兼容。 ICC 还包括数学内核库中许多 libm 函数的矢量化实现,这可能对您有用。
The math library distributed with ICC is substantially faster for many of the libm functions, but does require purchasing ICC. I believe you can download a free trial version if you're curious about it. I know that they support Linux, and believe that they try to be drop-in compatible with the GCC library. ICC also includes vectorized implementations of many of the libm functions in the Math Kernel Library, which may be useful to you.
AMD 和 Intel 都为其 CPU 提供了经过深度优化的数学库。他们不是免费的。
他们不实现简单的东西。这些库用于快速傅里叶变换、巨大的矩阵问题和其他问题。
快速数学编译器选项将大大加快浮点数学运算的速度。但是,您将负责自己的错误检查。
Both AMD and Intel have heavily optimized math libraries available for their CPUs. They are not free.
They don't implement simple stuff. These libraries are for fast Fourier transforms, huge matrix problems and other things.
The fast-math compiler option will speed up floating point math a lot. However, you will be responsible for your own error checking.
根据您想要运行的确切数学函数以及运行它们的数据集有多大,您可能需要查看类似 CUDA 它将让您使用图形芯片的快速数学功能来进行处理。
Depending on what exact math functions you are wanting to run and how large of a data set you will be running them on, you may want to take a look at something like CUDA which will let you use the speedy mathematical capabilities of your graphics chip to do your processing.