java,c或c ++ [英] java, c or c++

查看:78
本文介绍了java,c或c ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果程序是中等大的话,c和c ++之间的选择是非常明显的。


与c ++相比,java得分如何效率?

i guess java绝对有更多的库,更多的冗长(对程序员来说是清晰的b $ b等)

唯一关心的是效率。 java如何与C / C ++比较

那个?

解决方案

>从我的角度来看在早期看到Java比C +

+慢很多,但是最近。我注意到Java

程序的速度有了很大的提升。我看待它的方式,如果你正在构建一个每次运行10分钟的应用程序,你应该远离java

,因为它'每次运行时都要重新编译所有内容。

但是如果它是一个程序,将会运行数天,速度方面C +

+和Java差不多。


Java最糟糕的是内存。它只是使用了太多的内存。但正如你自己指出的那样,它有更多的库。所以

重量记忆与图书馆内容相关,并决定。


无论如何,这是我的两分钱。


Lucas


9月30日上午11:41,call_me_anything< sgiitne ... @ gmail.comwrote:

在b和c ++之间的
选择是非常明显的,如果程序甚至是中等大的话。


与c ++相比,java得分如何效率?

i guess java肯定有更多的库,更多的冗长(对程序员来说是清晰的b $ b等)

唯一关心的是效率。如何用java与C / C ++比较

那个?



call_me_anything写道:


c和c ++之间的选择非常明显如果该计划甚至是b $ b b适度大。



为什么?你只关心速度吗?

优化最重要的资源是


在效率方面,与c ++相比,java得分如何?



可怜。 Java是一个平台,但你已经拥有了一个平台,所以另外一个平台

它是一个完整的资源生长。


i guess java肯定有更多的库,更多的冗长(对程序员来说是清晰的b $ b)等等。



详细程度不明确。如果你想要清晰的线条,请使用像Ruby

这样的语言。然后你只写出重要的东西,而不是

无休止的文书工作Java让你填写完成任务。


唯一关心的是效率。如何用java与C / C ++比较

那个?



谷歌的过早优化是所有邪恶的根源,然后替代

硬和软层。


-

Phlip


在2007-09-30 16:41,call_me_anything写道:


c和c ++之间的选择是非常明显的,如果程序是偶然的话,那么
适度大。


在效率方面,java与c ++相比如何得分?

i猜java绝对有更多的库,更多的冗长(对程序员来说是清晰的b $ b)等等。 />
唯一关心的是效率。如何用java与C / C ++比较

那个?



效率如何?内存,CPU,开发时间?对于什么应用

域名?开发人员对语言的了解有多好?一个好的

开发人员使用他们所知道的语言将比使用一种语言的糟糕开发人员产生更好(对于

几乎任何更好的定义)他/

她不知道。需要考虑的其他因素是代码将运行的平台以及它需要与其进行交互的其他应用程序/设备。

Java和C ++都是优秀而有效的语言,并不总是出现同样的问题。我的建议是使用你最了解的语言,除非由于某些原因是不可能的。


-

Erik Wikstr ?? m


choice between c and c++ is pretty obvious if the program is even
moderately big.

how does java score in comparison to c++ in terms of efficiency ?
i guess java definitely has more libraries, more verbosity (for
clarity to programmers) etc etc.
The only concern is efficiency. How does java compare with C/C++ on
that ?

解决方案

>From what I''ve seen in its early days Java was much much slower than C+
+, however "lately" I''ve noticed a big speed increase in Java
programs. The way I see it, if you''re building an application that
will be ran for 10 min at a time, you should stay away from java
because it''ll have to recompile everything every time you run it.
However if it''s a program that''ll be ran for days, in terms of speed C+
+ and Java are just about the same.

What Java is still worst at is memory. It simply uses way too much
memory. But it has more libraries, as you pointed out yourself. So
weight memory vs "libraryfulness", and decided.

Anyway, that''s my two cents.

Lucas

On Sep 30, 11:41 am, call_me_anything <sgiitne...@gmail.comwrote:

choice between c and c++ is pretty obvious if the program is even
moderately big.

how does java score in comparison to c++ in terms of efficiency ?
i guess java definitely has more libraries, more verbosity (for
clarity to programmers) etc etc.
The only concern is efficiency. How does java compare with C/C++ on
that ?



call_me_anything wrote:

choice between c and c++ is pretty obvious if the program is even
moderately big.

Why? Are you only concerned about speed? The most important resource to
optimize is

how does java score in comparison to c++ in terms of efficiency ?

Pitiful. Java is a platform, but you already have one, so another one on top
of it is a complete resource hog.

i guess java definitely has more libraries, more verbosity (for
clarity to programmers) etc etc.

Verbosity is not clarity. If you want clear lines, use a language like Ruby
that stays out of your way. Then you only write what''s important, not the
endless paperwork Java makes you fill out just to get anything done.

The only concern is efficiency. How does java compare with C/C++ on
that ?

Google for "premature optimization is the root of all evil", then "alternate
hard and soft layers".

--
Phlip


On 2007-09-30 16:41, call_me_anything wrote:

choice between c and c++ is pretty obvious if the program is even
moderately big.

how does java score in comparison to c++ in terms of efficiency ?
i guess java definitely has more libraries, more verbosity (for
clarity to programmers) etc etc.
The only concern is efficiency. How does java compare with C/C++ on
that ?

What efficiency? Memory, CPU, development time? For what application
domain? How good is the developer''s knowledge of the languages? A good
developer with a language they know will will always produce better (for
almost any definition of better) than a bad developer in a language he/
she does not know. Other factors that needs to be considered are what
platform the code will run on and what other applications/devices it
needs to interact with.

Java and C++ are both good and efficient languages, just not always for
the same kinds of problems. My advice is to go with the language that
you know best, unless for some reason that is not possible.

--
Erik Wikstr??m


这篇关于java,c或c ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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