脚本语言与静态编译语言 [英] scripting languages vs statically compiled ones

查看:75
本文介绍了脚本语言与静态编译语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!


是否有关于脚本语言性能的权威来源

,例如python与java,c,c ++等。<这是一个报告,所以如果我可以引用一些众所周知的

权限,这将是非常棒的。


谢谢


欢呼


--------------------- -------------------------------------------

此消息是使用IMP,Internet消息传递程序发送的。

hi!

is there an authoritative source on the performance of scripting languages
such as python vs. something like java, c, c++.

its for a report, so it would be awesome if i could quote some well-known
authority on this.

thanks

cheers

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

推荐答案

在文章< ma *********** ***************************@python.o rg>,

Ajay< ab **** **@mail.usyd.edu.au>写道:
In article <ma**************************************@python.o rg>,
Ajay <ab******@mail.usyd.edu.au> wrote:
嗨!

有一个关于脚本语言性能的权威来源,例如python与java,c,c ++之类的东西。 />
它是一个报告,所以如果我可以引用一些众所周知的权威,这将是非常棒的。
hi!

is there an authoritative source on the performance of scripting languages
such as python vs. something like java, c, c++.

its for a report, so it would be awesome if i could quote some well-known
authority on this.



Ajay写道:
是否有关于脚本语言性能的权威来源,例如python与java,c,c ++之类的内容。

一份报告,如果我可以引用一些众所周知的权威,这将是非常棒的。
is there an authoritative source on the performance of scripting languages
such as python vs. something like java, c, c++.

its for a report, so it would be awesome if i could quote some well-known
authority on this.




定义众所周知的和权威的。对于大多数定义,

答案是否。虽然。


-Peter



Define "well-known" and "authoritative". For most definitions,
the answer would be "no" though.

-Peter


Cameron Laird< cl **** @ lairds.us>写道:
Cameron Laird <cl****@lairds.us> wrote:
在文章< ma ******************************* *******@python.o rg>,
Ajay< ab ****** @ mail.usyd.edu.au>写道:
In article <ma**************************************@python.o rg>,
Ajay <ab******@mail.usyd.edu.au> wrote:

是否有关于脚本语言性能的权威来源,例如python与java,c,c ++之类的东西。

它是一个报告,所以如果我可以引用一些众所周知的权威,这将是非常棒的。

is there an authoritative source on the performance of scripting languages
such as python vs. something like java, c, c++.

its for a report, so it would be awesome if i could quote some well-known
authority on this.



寻找过早优化。在
< URL:
http://groups.google.com/groups?selm...25aleaxit%40ya
hoo.com>和< URL:
http:/ /groups.google.com/groups?selm...25aleaxit%40ya
hoo.com>


.
Look for "premature optimization" in
<URL:
http://groups.google.com/groups?selm...25aleaxit%40ya
hoo.com > and <URL:
http://groups.google.com/groups?selm...25aleaxit%40ya
hoo.com >




嘿 - 谢谢在这种情况下引用我的荣幸,Cameron,

但我怀疑Ajay会想要更多的东西。


我会推荐Prechelt'' C,C ++,Java的实证比较,
Perl,Python,Rexx和Tcl,

< http://page.mi.fu-berlin。 de / ~prechelt / Biblio / jccpprt_computer2000.pdf>,

发表在IEEE的计算机杂志上。


实证结果摘要:

'''''

"脚本语言" (Perl,Python,Rexx,Tcl)比

传统语言更有效率。 (C,C ++,Java)。在运行时间和内存消耗方面,它们通常比Java更好,而且比C或C ++更糟糕的是b $ b。一般来说,语言之间的差异往往比典型差异小,因为不同的程序员使用相同的语言。

'' ''''


但是,得到并研究整篇论文 - 这些结论需要得到深入研究。例如:大多数情况下,生产力几乎是恒定的

LOC /小时,脚本语言的中位数长度(对于给定的

问题)为100,而其他人则为250左右,确认功能点

理论;然而,用更精细的颗粒看它显示LOC /小时

(中位数)对于Python高达40,对于Java和Rexx低至20(Rexx

结果和C一样,由于研究中的项目较少而令人怀疑。

即,在实验条件下的经验实践中,

Python程序不仅少了比同一个任务执行的Java的大小的一半,但也写得差不多5倍(因为

2行数/小时乘以一个因子程序大小为2.5,对于执行相同任务的程序来说是多少。不同程序的可靠性也很重要,而且对于更高级别的语言来说,它往往更高(尽管作者

谨慎地说不会超过''不低于可靠'' )。


当然,任何这样的技术比较都发生在_ / $
time_中的一点上,强调了认为一个人能够比较的愚蠢在给定的

时间内_languages_而不是_implementation_的
表现。自实验以来的几年里,Java和/或
Python实现的性能已经提高,并且已经投入大量精力来优化各自的虚拟机(特别是
类似于英特尔的处理器上的
;其他的,例如PPC,似乎有一些虚拟机,而b $ b b的优化程度较低);我相信其他语言的'

实现在性能方面没有显着变化。


访问 http://shootout.alioth.debian.org/ 并下载并尝试

枪战 - 需要很多批判性思维的能力和良好的知识来解决很多问题,公平地指出但是

未解决该页面的链接 - 是另一种可能性。

Alex



Heh -- thanks for the honor of quoting just me in this context, Cameron,
but I suspect Ajay would like something more.

I would recomment Prechelt''s "An empirical comparison of C, C++, Java,
Perl, Python, Rexx, and Tcl",
<http://page.mi.fu-berlin.de/~prechelt/Biblio/jccpprt_computer2000.pdf>,
published in IEEE''s Computer magazine.

Summary of empirical results:
''''''
"scripting languages" (Perl, Python, Rexx, Tcl) are more productive than
"conventional languages" (C, C++, Java). In terms of run time and memory
consumption, they often turn out better than Java and not much worse
than C or C++. In general, the differences between languages tend to be
smaller than the typical differences due to different programmers within
the same language.
''''''

But, get and study the whole paper -- these conclusions need to be
studied in depth. E.g.: mostly, productivity is due to almost constant
LOC/hour, with scripting languages having median length (for given
problem) of 100 vs others'' around 250, confirming "function point"
theory; however, looking at it with a finer grain shows LOC/hour
(median) as high as 40 for Python, as low as 20 for Java and Rexx (Rexx
results, like C ones, doubtful due to fewer programs under study).
I.e., in empirical practice under the experiment''s conditions, the
Python program is not only less than half the size of the Java one doing
the same task, but also gets written almost 5 times as fast (a factor of
2 in lines/hour times a factor of 2.5 in program size for programs doing
the same task). Reliability of the different programs also matters, and
it tends to be higher for higher level languages (though the author
prudently says no more than ''no less reliable'').

Of course, any such comparison of technologies happens _at one point in
time_, underscoring how silly it is to think one is able to compare
performance of _languages_ rather than their _implementation_ at a given
time. In the years since the experiment, the performance of Java and
Python implementations has increased, with substantial effort having
been put into optimizing the respective virtual machines (particularly
on intel-like processors; others, such as PPC, appear to have VMs that
are less highly optimized); I believe the other languages''
implementations have not changed significantly in performance terms.

Visiting http://shootout.alioth.debian.org/ and downloading and trying
the "shootout" -- needs a lot of ability for critical thinking and good
all around knowledge to fix a lot of issues, fairly pointed out but
unsolved in links from that page -- is another possibility.
Alex


这篇关于脚本语言与静态编译语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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