2017年的golang、python、php、c++、c、java、Nodejs效能對比[續]

來源:互聯網
上載者:User

標籤:preview   enter   numpy   1.3   post   c++ java   情況   utf-8   1.7   

 2017年的golang、python、php、c++、c、java、Nodejs效能對比[續]

  最近忙,這個話題放了幾天,今天來個續集。   上篇傳送門: 2017年的golang、python、php、c++、c、java、Nodejs效能對比(golang python php c++ java Nodejs Performance)

 

    好了,上回的某些事有些人有異議,今天也回應下。

  1.有人說python效能沒那麼Low?

  這個我用pypy 2.7確認了下,確實沒那麼差, 如果用numpy或其他版本python的話,效能更快。但pypy還不完善,pypy3在beta,  所以一般情況,我是說一般情況下,這點比較讓人不爽。

[email protected]:/works/learnCPP$ pypy -V && time pypy fib.pyPython 2.7.12 (aff251e54385, Nov 09 2016, 17:25:49)[PyPy 5.6.0 with GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)]5702887real    0m0.206suser    0m0.173ssys     0m0.028s

  2.有人說怎麼沒有C#、Rust、Ruby這個那個的?

  我只想說語言百千萬,實在太多,但精力不要放在工具上, 選擇一個合適的就好。 

  實在想看,也有:

 

Language CPU time Slower than Language
version
Source
code
User System Total C++ previous
C++ (optimized with -O2) 0.899 0.053 0.951 g++ 6.1.1 link
Rust 0.898 0.129 1.026 7% 7% 1.12.0 link
Java 8 (non-std lib) 1.090 0.006 1.096 15% 6% 1.8.0_102 link
Python 2.7 + PyPy 1.376 0.120 1.496 57% 36% PyPy 5.4.1 link
C# .NET Core Linux 1.583 0.112 1.695 78% 13% 1.0.0-preview2 link
Javascript (nodejs) 1.371 0.466 1.837 93% 8% 4.3.1 link
Go 2.622 0.083 2.705 184% 47% 1.7.1 link
C++ (not optimized) 2.921 0.054 2.975 212% 9% g++ 6.1.1 link
PHP 7.0 6.447 0.178 6.624 596% 122% 7.0.11 link
Java 8 (see notes) 12.064 0.080 12.144 1176% 83% 1.8.0_102 link
Ruby 12.742 0.230 12.972 1263% 6% 2.3.1 link
Python 3.5 17.950 0.126 18.077 1800% 39% 3.5.2 link
Perl 25.054 0.014 25.068 2535% 38% 5.24.1 link
Python 2.7 25.219 0.114 25.333 2562% 1% 2.7.12 link


       還有權威對比: https://benchmarksgame.alioth.debian.org/u64q/go.html   原文 https://blog.famzah.net/2016/09/10/cpp-vs-python-vs-php-vs-java-vs-others-performance-benchmark-2016-q3/

   大家看看就好。

  

  最後,就是加個大圖,說明一切

  但是圖中沒有算compile時間,對動態語言不公平。

  另外, 效能相差不大的話, 誰開發效率高,誰是王者, 明顯Go是未來明星(也許要加之一,哈哈),nodejs潛力不小!!!

 

 

 

     

  

  

 

2017年的golang、python、php、c++、c、java、Nodejs效能對比[續]

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.