当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 10 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : [转帖]主流语言的性能
帖子发表于 : 2008-07-22 8:01 
头像

注册: 2007-03-13 11:23
帖子: 1343
送出感谢: 0 次
接收感谢: 0 次
代码:
Benchmarking programming languages?

How can we benchmark a programming language?
We can't - we benchmark programming language implementations.

How can we benchmark language implementations?
We can't - we measure particular programs.

21 Jul 2008

Benchmarks timed on:
 Gentoo : Intel® Pentium® 4
   

26 Feb 2008

Benchmarks timed on:
 Debian : AMD™ Sempron™

Programming language measurements A to Z

Ada 2005 GNAT large-scale safety-critical software

BASIC FreeBASIC quickbasic compatible imperative programming

C CINT seamless c c++ interpreter compiler

C Cyclone safe dialect of c Debian

C GNU gcc unchecked low-level programming

C Intel unchecked low-level programming

C Tiny unchecked low-level programming Debian

C# Mono oo plus functional style (mono is not ms .net)

C++ GNU g++ c plus objects plus generics

C++ Intel c plus objects plus generics

CAL lazy functional programming for jvm

Clean lazy & strict pure functional programming

D Digital Mars c++ reduced and simplified

D GNU c++ reduced and simplified Debian

Dylan Gwydion multi-method oo programming Debian

Eiffel SmartEiffel everything is an object plus design by contract

Erlang concurrent real-time distributed fault-tolerant software

Erlang HiPE jit native code compiler for erlang

F# Mono higher-order type-safe programming (mono is not ms .net)

Forth bigForth extensible postfix stack programming

Forth GNU GForth extensible postfix stack programming

Fortran G95 pioneering numeric and scientific programming

Fortran Intel pioneering numeric and scientific programming

Groovy “agile” “dynamic” “java compatible” for jvm

Haskell GHC lazy pure functional programming

Icon high-level string processing

Io everything is a prototype object minimalism

Java 1.4 -server ubiquitous jit server virtual machine

Java 6 -client ubiquitous jit client virtual machine

Java 6 -server ubiquitous jit server virtual machine

Java 6 -Xint ubiquitous bytecode interpreter virtual machine

Java 6 -Xms64m initial java server heap size 64m

Java GNU gcj optimizing ahead-of-time compiler

JavaScript JavaScriptCore WebKit-based ECMA scripting implementation Debian

JavaScript Rhino web-browser to jvm scripting

JavaScript SpiderMonkey ubiquitous web-browser embedded scripting

Lisaac everything is a prototype object plus design by contract

Lisp SBCL pioneering s-expression oriented programming

Lua associative arrays for extensible embedded scripting

Lua LuaJIT jit compiler fully compatible with lua 5.1

Matlab GNU Octave linear and nonlinear problems and numerical experiments Debian

Mercury functional & logic programming

Mozart/Oz multi-multi-multi-paradigm distributed programming

Nice multi-method type-safe oo for jvm

Oberon-2 OO2C modular programming plus objects

Objective-C GNU c plus a thin layer of smalltalk Debian

OCaml modular type-safe strict functional programming plus objects

OCaml (bytecode) modular type-safe strict functional programming plus objects Debian

Parrot PIR intermediate code for parrot byte code or parrot asm Debian

Pascal Free Pascal imperative programming plus objects

Perl server-side shell & cgi scripts

PHP scripts embedded in html, and much more

Pike explicitly-typed dynamic oo programming

Prolog SWI goal-oriented pattern-matching rules and facts

Prolog YAP goal-oriented pattern-matching rules and facts

Python uncluttered imperative programming plus objects

Python IronPython scripting for .net (mono is not ms .net)

Python Psyco representation-based just-in-time specialization

Rebol metadata scripting for distributed computing

Rexx Regina historic - originally ibm - scripting Debian

Ruby programmer fun - everything is an object scripting

Ruby Core 1.9.0 yet another ruby virtual machine

Ruby JRuby everything is an object scripting for jvm

S-Lang embeddable extension language Debian

Scala higher-order type-safe programming for jvm

Scheme Bigloo statically-scoped properly tail-recursive dialect of lisp Debian

Scheme Chicken translate scheme source to portable c code

Scheme Ikarus R6RS compatible incremental compiler


Scheme PLT statically-scoped properly tail-recursive dialect of lisp

Smalltalk GNU uniform reflective environment - for scripting

Smalltalk Squeak uniform reflective environment - real live objects

Smalltalk VisualWorks uniform reflective environment - real live objects

SML MLton whole-program optimizing compiler

SML SML/NJ modular type-safe strict functional programming

Tcl everything is a string - programmable programming

Zonnon Mono active objects (mono is not ms .net)

为此DHH的评论是
Outsourcing the performance-intensive functions
测试结果:
http://shootout.alioth.debian.org/


_________________
"We are all in the mud, but some of us are looking at the stars." (Oscar Wilde)
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/


最后由 kofshower 编辑于 2008-07-22 12:16,总共编辑了 1 次

页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2008-07-22 9:10 

注册: 2007-08-02 20:29
帖子: 21288
系统: 窓辺とうこ
送出感谢: 0 次
接收感谢: 22
强烈要求翻译


页首
 用户资料  
 
3 楼 
 文章标题 :
帖子发表于 : 2008-07-22 9:28 

注册: 2006-09-11 22:47
帖子: 2841
送出感谢: 0 次
接收感谢: 4
性能评测结果呢???

贴这么多语言,没有平册结果有什么用。


页首
 用户资料  
 
4 楼 
 文章标题 :
帖子发表于 : 2008-07-22 10:59 

注册: 2006-04-13 13:43
帖子: 72
送出感谢: 0 次
接收感谢: 1
poet 写道:
性能评测结果呢???

贴这么多语言,没有平册结果有什么用。


页首
 用户资料  
 
5 楼 
 文章标题 :
帖子发表于 : 2008-07-22 12:18 
头像

注册: 2007-03-13 11:23
帖子: 1343
送出感谢: 0 次
接收感谢: 0 次
JiangHui 写道:
强烈要求翻译

上面都是这个评测的平台和涉及的语言。。


_________________
"We are all in the mud, but some of us are looking at the stars." (Oscar Wilde)
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/


页首
 用户资料  
 
6 楼 
 文章标题 :
帖子发表于 : 2008-07-22 12:21 
头像

注册: 2007-03-13 11:23
帖子: 1343
送出感谢: 0 次
接收感谢: 0 次
poet 写道:
性能评测结果呢???

贴这么多语言,没有平册结果有什么用。

结果很复杂啊,一个语言一页。参见下面的链接咯
基本上速度都是脚本语言的弱点。所以DHH(Rail的发明人)才会说“把性能密集的程序外包出去”


_________________
"We are all in the mud, but some of us are looking at the stars." (Oscar Wilde)
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/


页首
 用户资料  
 
7 楼 
 文章标题 :
帖子发表于 : 2008-07-22 12:29 
头像

注册: 2007-03-13 11:23
帖子: 1343
送出感谢: 0 次
接收感谢: 0 次
里面给出了测试算法的代码
编译指令
和对照类似语言的性能


_________________
"We are all in the mud, but some of us are looking at the stars." (Oscar Wilde)
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/


页首
 用户资料  
 
8 楼 
 文章标题 :
帖子发表于 : 2008-07-22 12:48 

注册: 2006-09-11 22:47
帖子: 2841
送出感谢: 0 次
接收感谢: 4
看来同时测试性能和内存占用很重要!

Java JIT 跟 C 的性能差距已经缩小到十倍以内,然而其内存占用却是C的十倍到一百倍的水平。

相反,Python的跟C的性能差距仍然在十到一百倍之间,其内存占用却在C的十倍以内。


页首
 用户资料  
 
9 楼 
 文章标题 :
帖子发表于 : 2008-07-22 12:58 
头像

注册: 2006-07-02 11:16
帖子: 12522
地址: 廣州
送出感谢: 0 次
接收感谢: 8
期待 pypy ..


_________________
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。


页首
 用户资料  
 
10 楼 
 文章标题 :
帖子发表于 : 2008-07-22 13:04 
头像

注册: 2007-03-13 11:23
帖子: 1343
送出感谢: 0 次
接收感谢: 0 次
poet 写道:
看来同时测试性能和内存占用很重要!

Java JIT 跟 C 的性能差距已经缩小到十倍以内,然而其内存占用却是C的十倍到一百倍的水平。

相反,Python的跟C的性能差距仍然在十到一百倍之间,其内存占用却在C的十倍以内。

Java预编译而且加载到内存中了。所以有这样的成绩。
咔咔。如果不开git的话~~


_________________
"We are all in the mud, but some of us are looking at the stars." (Oscar Wilde)
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 10 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 3 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译