简体   繁体   English

STL的高性能替代品?

[英]High performance alternatives to STL?

What cache friendly high performance alternatives are there to the traditional STL. 传统的STL有哪些缓存友好的高性能替代品。 They should be optimized for the caches of modern 64bit Intel/AMD CPU's. 它们应该针对现代64位Intel / AMD CPU的缓存进行优化。

I'm not looking for official standards based STL implementations necessarily it could be based on that or be an extended STL with high performance data structures. 我不是在寻找基于官方标准的STL实现,它必须基于它,或者是具有高性能数据结构的扩展STL。 Or simply a library that provides general data structures like list, map etc. 或者只是一个提供列表,地图等常规数据结构的库。

High concurrency and lock free data structures would be a bonus. 高并发和无锁数据结构将是一个奖励。

I'm interested in a link & a licence. 我对链接和许可感兴趣。

I've read about EASTL and have used Boost before. 我读过有关EASTL并且之前使用过Boost的文章。

What are game developers and the scientific community using to get the most out of the CPU's at the moment? 游戏开发者和科学界目前使用什么来充分利用CPU? What is in the pipeline? 什么在管道中?

+1 for EASTL. EASTL为+1。

Anything based on a C++11 compliant compiler will potentially perform a lot better because of move semantics. 任何基于C ++ 11兼容编译器的东西都可能因为移动语义而执行得更好。

This difference can already be made visible with the GNU libstdc++ implementation with -std=c++0x 使用-std=c++0x的GNU libstdc ++实现已经可以看到这种差异

For concurrency/lockfree containers I recommend: 对于并发/无锁容器,我建议:

  • libCds by Max Khiszinsky libCds由Max Khiszinsky
  • TBB from Intel (no hands-on experience) 来自英特尔的TBB(没有亲身体验)

My central piece of advice would be this: 我的中心建议是这样的:

Optimizing the standard library is mostly a factor of deciding how to use algorithms/containers correctly than looking for the 'perfect' implementation. 优化标准库主要是决定如何正确使用算法/容器而不是寻找“完美”实现的因素。 STL being general purpose, there would never be a perfect implementation. STL是通用的,永远不会有完美的实现。

Just watch your return values/out parameters closely (prefer to use output iterators, and use transform , partial_sum , accumulate into a container that had reserve or resize called on it appropriately; Define swap for your element types etc.) 只需密切关注返回值/输出参数(更喜欢使用输出迭代器,并使用transformpartial_sumaccumulate到已适当调用reserveresize的容器中;为元素类型定义swap等)

Boost Compute is definitely a runner up. Boost Compute绝对是一名亚军。

http://boostorg.github.io/compute/ http://boostorg.github.io/compute/

I believe the Standard Template Adaptive Parallel Library STAPL , may well be one of the most important research collaborations at the moment. 我相信标准模板自适应并行库STAPL可能是目前最重要的研究合作之一。

Microsoft are investing significant effort into the Asynchronous Agents Library , which has a number of well tested high performance containers for message passing. 微软正在向异步代理库投入大量精力,该具有许多经过良好测试的高性能容器,用于传递消息。

Intel have their own offering, Thread Building Blocks that contains a number of containers and algorithms for parallel processing. 英特尔拥有自己的产品线程构建模块 ,其中包含许多用于并行处理的容器和算法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM