提升

编程入门 行业动态 更新时间:2024-10-28 14:34:50
本文介绍了提升 - 好还是坏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 这是对升级库可用性的调查。 我们是一家C ++商店,并且一直在使用STL一段时间了。当关于使用提升的 问题出现时,团队中的一些开发人员报告了糟糕的过去经历。也就是说,可执行文件大小 膨胀,编译时间急剧增加,调试得到了更多困难。我想知道这些负面影响是否确实存在。实际上存在。 如果你有任何提升经验,可以告诉我有关 可能的副作用,请回答这个帖子。 谢谢, Stefan

解决方案

这是对升级库可用性的调查。 我们是一个C ++商店,现在已经使用STL一段时间了。当 关于使用提升的问题出现时,团队中的一些开发人员报告了糟糕的过去经历。也就是说,可执行的 大小 臃肿,编译时间大幅增加,调试 得到了 更难。我想知道这些负面影响是否确实存在。实际上存在这种情况。 如果你有任何关于提升的经验,并且可以分辨关于 可能的副作用,请回答这个帖子。

说到boost:spirit(解析器生成器)。 - 代码变大 - 编译时间令人难以置信 - 执行速度非常棒 - 除了精神之外还要用其他任何东西写作 今天保持忙碌。 简历:Parser =精神,期间。

IndyStef写道:

,可执行文件大小 膨胀,

任何大的情况都是如此。库。 当您添加类和函数时,您的可执行文件会变得更大。 此外,模板的实例化不会共享代码,因此实现了两种类型的a模板给你的代码是实例的两倍。 一个。 然而,这与你实际写的一样代码两次用 两种不同的类型。

编译时间大幅增加, 这就是任何复杂的东西,特别是当与 模板相关时。 没有多少你可以做到这一点。您可以使用预编译的 标题或尝试使用其他可能更快的编译器。 无论如何这些问题通常都不被认为是非常重要的。 和调试得到 更难。

任何复杂的东西就是这种情况,特别是当与 模板相关时。 我认为有一些工具可以使与模板相关的错误更多 可读。

我想要找出这些负面影响确实存在。实际上存在。

它们存在,但它们与boost无关。 它们与C ++的工作原理有关。

Gernot Frisch写道:

这是对boost库的可用性的调查。 我们是一家C ++商店,现在已经使用STL一段时间了。当 关于使用提升的问题出现时,团队中的一些开发人员报告了糟糕的过去经历。也就是说,可执行的 大小 臃肿,编译时间大幅增加,调试 得到了 更难。我想知道这些负面影响是否确实存在。实际上存在这种情况。 如果你有任何关于提升的经验,并且可以分辨关于 可能的副作用,请回答这个帖子。

说到boost:spirit(解析器生成器)。 - 代码变大 - 编译时间令人难以置信 - 执行速度非常棒 - 除了精神之外还要用其他任何东西写作 今天保持忙碌。 简历:Parser =精神,期间。

是的,Spirit是一件艺术品。我将它用于任何实际上具有正确解析器实现的任何东西(有一个区域有人出现 带有文件格式但我认为无法写一个准确的 解析器......只是一个猜测者)。另一方面,其他开发者 不能为学习EBNF而烦恼,所以我是唯一一个可以工作的人。 代码......我不要指望它在我离开后很久就能存活下来。很遗憾 真的....所有其他解析器都是用std :: stroke()编写的,是不可靠的,难以理解的,因为变化很脆弱 格式,充满了单片功能;而我用一个相当复杂的文件格式写的 的那个是小的,模块化的,并且 易于理解。

Hi all, This is an inquiry into the usability of the boost libraries. We are a C++ shop, and have been using STL for some time now. When the question about using boost came up, some developers in the team reported bad past experiences with boost. Namely, the executable size bloated, the compilation time increased dramatically, and debugging got more difficult. I would like to find out if those negative effects do in fact exist. If you have any experiences with boost, and could tell me about the possible side effects, please answer to this thread. Thank you, Stefan

解决方案

This is an inquiry into the usability of the boost libraries. We are a C++ shop, and have been using STL for some time now. When the question about using boost came up, some developers in the team reported bad past experiences with boost. Namely, the executable size bloated, the compilation time increased dramatically, and debugging got more difficult. I would like to find out if those negative effects do in fact exist. If you have any experiences with boost, and could tell me about the possible side effects, please answer to this thread.

Speaking of boost:spirit (a parser generator). - code got bigger - compile time was incredible - execution speed is awesome - writing with anything else but spirit would still keep be busy today. Resume: Parser = Spirit, period.

IndyStef wrote:

Namely, the executable size bloated,

That''s the case with any "big" library. When you add classes and functions, your executable gets bigger. Moreover, instanciations of templates don''t share code, so instanciating a template for two types gives you twice as much code as instanciating it for one. This is, however, the same as if you actually wrote the code twice with the two different types.

the compilation time increased dramatically,

That''s the case with any complex stuff, especially when related to templates. There is not much you can do about this. You could use precompiled headers or try with other possibly faster compilers. Anyway such problems usually aren''t considered very important.

and debugging got more difficult.

That''s the case with any complex stuff, especially when related to templates. I think there are some tools which make errors related to templates more readable.

I would like to find out if those negative effects do in fact exist.

They exist, but they''re not related to boost. They''re related to how C++ works.

Gernot Frisch wrote:

This is an inquiry into the usability of the boost libraries. We are a C++ shop, and have been using STL for some time now. When the question about using boost came up, some developers in the team reported bad past experiences with boost. Namely, the executable size bloated, the compilation time increased dramatically, and debugging got more difficult. I would like to find out if those negative effects do in fact exist. If you have any experiences with boost, and could tell me about the possible side effects, please answer to this thread.

Speaking of boost:spirit (a parser generator). - code got bigger - compile time was incredible - execution speed is awesome - writing with anything else but spirit would still keep be busy today. Resume: Parser = Spirit, period.

Yes, Spirit is a work of art. I use it for anything that actually has a correct parser implementation (there is an area where someone came up with a "file format" but I see no way to write an accurate parser...only a guesser). On the other hand, the other developers can''t be bothered to learn EBNF so I''m the only one that can work on that code...I don''t expect it to survive long after I''m gone. Sad really....all the other parsers are written with std::stroke(), are less reliable, harder to understand, fragile in response to changes in the format, and full of monolithic functions; whereas the one I wrote with Spirit for a rather complex file format is small, modularized, and easy to understand.

更多推荐

提升

本文发布于:2023-06-05 11:30:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/518793.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!