是否使用命名空间影响性能或编译时? [英] Does using namespaces affect performance or compile time?

查看:197
本文介绍了是否使用命名空间影响性能或编译时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我把一个项目的所有类在同一个命名空间中的所有类都可以无处不在的项目。但是,如果我使用不同的命名空间并非所有的类都随处可见。我收到了限制。

If I put all classes of a project in the same namespace all classes are available everywhere in the project. But if I use different namespaces not all classes are available everywhere. I get a restriction.

是否使用命名空间影响编译时不知何故?由于编译器在每个命名空间较小的类,而不是所有的命名空间中使用的所有的时间,他可能有一点小麻烦找到合适的课程。

Does using namespaces affect the compile time somehow? Since the compiler has less classes in each namespace and not all namespaces are used all the time he may have a little less trouble finding the right classes.

将使用名称空间会影响应用程序的性能?

Will using namespaces affect the applications performance?

推荐答案

这不会影响执行时间的表现。

It won't affect the execution-time performance.

这可能会影响到编译时的表现,但我怀疑,这将是显著的一切,我甚至不喜欢predict哪种方式会影响它。 (你有一个问题很长的编译时间?如果是这样,你可能想尝试一下,然后测量的差别......不然你真的会不知道效果。如果没有问题,这不是'吨真的无所谓。)

It may affect the compile-time performance, but I doubt that it would be significant at all, and I wouldn't even like to predict which way it will affect it. (Do you have an issue with long compile times? If so, you may want to try it and then measure the difference... otherwise you really won't know the effect. If you don't have a problem, it doesn't really matter.)

这篇关于是否使用命名空间影响性能或编译时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆