<<>No>
利用C++标准图书馆生产极为快速的生产。 当然,在具体假设情景<>中,可以改进这些执行情况——这类似于在你知道你的执行与一般用途分配者有何不同时写你的自己的分配人,以及如何优化使用。 因此,当然可以分析这一问题,并产生比一般目标执行更快的最佳执行(或推动)。
Of course, any library can also be misused, which could result in compromised execution. The short of it is that boost (a large collection of libraries) implementations are an excellent starting point for fast implementations. If you need it to be faster than boost, determine the problem and improve it.
许多C++开发商对业绩感到关切;一般而言,比其他语文多。 推广工作一般都受到重视,同行审查,使用实施方法测试和形成标准图书馆特征的基础。
-----
Thanks to Justin for letting me share his answer on the closed question: -- Seth
恰恰相反。
Boost is not about safety belts.
缩略语为高水平软件部件,有高水平抽象 这避免了通常的图书馆与其他框架/图书馆见面。
For example, your Boost Graph library does not require you to switch data structures at all: you can use/adapt any data structure that performs well for your application. In the worst case, you might have to write a traits class to help Boost with the interpretation; It is precisely this trait (common to modern template libraries) that makes Boost perform like nothing else in practice: there won t be as much library impedance mismatch. This is directly in line with C++11 s new concepts around threading and move semantics: preventing even the most elementary cases of data copying.
此外,所有这些图书馆都遵守你自己的拨款安排,使记忆管理得以保持。 您可在C#中调用128个轨道内线病媒,但必须跳跃到许多灯泡< 2,并且你永远不能用<>任何途径<>与APIC/ES框架合作。
在C++中,你只支付你使用的费用,Boost完全本着这一精神。
我认为,我只字不提这一点,但我已经做了很多工作。
最后,我要从另一个方面来审视一下:在C#中,起草执行人员守则要困难得多,因为看到幕后出现的情况会更加困难。
Once you drop behind the scenes (unsafe mode, IL code) you ll arguably be less safe than in C++, because in C++ there is a transparent policy of what happens where and how. In C# you can t even trust an int*
that you got one line ago (because the Garbage Collector might have moved your cheese); There is no telling what the compiler
and or the JIT engine will make of your nice generic code3.
简言之,你可以仅仅在任何地方写坏的法典,但不能责怪波斯特。 STL只能被指责为ane的原始性能<4>。
<>1> PoCo, Qt, MFC, WTL, Whatnot....
2Mono SIMD
example 博客在网上反馈
<<4>Thatstd:copy
将在SSE4、MOVSW或仅简单易懂的纸浆基础上,在最佳实施过程中静态翻译,货币可以购买,但你甚至不必写一封信,而不必复制istream
至>>>>>>>>>。