这个各大语言性能测试结果挺有意思
source link: https://www.v2ex.com/t/862452
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
这个各大语言性能测试结果挺有意思 - V2EX
INCerry 13 小时 21 分钟前 11 C# yyds
|
dcsuibian 13 小时 14 分钟前 知道 Python 慢,不过没想到有这么慢
|
liushuangbill 13 小时 13 分钟前 7 Node.js 还挺快
|
v23x 13 小时 12 分钟前 Rust the only true god
|
kerrspace 13 小时 8 分钟前 有没有大佬来说一下 rust 替代 c++的前景
|
qrobot 13 小时 7 分钟前 Java 不是性能取决于 JVM 么?
|
zmqiang 13 小时 7 分钟前 看了两遍才发现图的左边和右边顺序不一样
|
min 13 小时 6 分钟前 1 C#可以啊
|
ragnaroks 13 小时 4 分钟前 我虽然经常黑 java ,但是 java 不应该这么慢,最多落后 dotnet 两个身位,如果这个图是 dotnet 6 、java 11 那当我没说
|
Phishion 13 小时 1 分钟前 1 python3 倒数第一几个意思?后面没有其他语言了?
|
Leviathann 13 小时 0 分钟前 swift 是不是最慢的 native 语言
|
mosfet 12 小时 58 分钟前 我记得 C# JAVA GO 都差不多的,半斤八俩
|
ecnelises 12 小时 57 分钟前 via iPhone OCaml 的速度有点令人惊喜啊(虽然 Haskell 更快)。
Swift 直接毙了吧,背靠 LLVM 的静态语言搞成这样,不知道加入所有权后能提高多少。 |
MakHoCheung 12 小时 51 分钟前 Swift 不是编译成二进制的吗,这么慢
|
bk201 12 小时 51 分钟前 java 的性能有这么差吗?
|
buxudashi 12 小时 50 分钟前 lua 不是说很好吗?怎么连 PHP 都不如?
|
makelove 12 小时 46 分钟前 我大 javascript 神一样的存在
|
nmap 12 小时 45 分钟前 go 比起 c/c++/rust 还是差不少啊😥
|
ifdef 12 小时 38 分钟前 我大 javascript 神一样的存在
|
ragnaroks 12 小时 30 分钟前 @buxudashi lua 应该有两种用法,一个是基于 luajit 动态解析运行,一个是(开发游戏常用)直接编译成 lua.dll ,前者性能差到以为是网络卡了,后者应该在 c/c++ 的十倍以内
|
Cyshall 12 小时 29 分钟前 1 c# 为什么这么屌?
|
princelai 12 小时 26 分钟前 这个一年多前就讨论过了啊,我也画过图,https://www.v2ex.com/t/776893#reply51
另外 python 慢是因为他是用纯内置语言来实现算法,但实际上 python 除了调用 C++和 fortrain 写的东西外,在 numpy 和 numba 等技术加持下,python 写数值计算和算法并不慢,甚至能超过 90%的语言,我是没遇到过什么瓶颈。 |
luob 12 小时 25 分钟前 1 基本符合日常经验,c/c++开了 o2 之后谁也打不过,go 和 java 一个水平,比 nodejs 快 30-40%,python 比主流语言慢两个数量级(
|
tabris17 12 小时 25 分钟前 1 壮哉!大 python
|
iyaozhen 12 小时 25 分钟前 @Phishion 不是说人多就没有性能问题。
Python 主要是乘着 AI 的大船,不然使用量会少很多。这里说的是语音本身,但 Python 的特色是胶水语言和 C 紧密结合,这块大大提高了性能天花板 |
Mark24 12 小时 7 分钟前 ruby 可以开 JIT ,会再快一倍左右
|
damngood 12 小时 7 分钟前 swift 和 go 的内存消耗指标很不错.
|
lolizeppelin 11 小时 56 分钟前 erlang 居然只比 python2 好一点点?
|
snoopyhai 11 小时 50 分钟前 印象中, deno 不是说因为 node 差, 才生出来的嘛. node 都在榜上, deno 上不了榜么?
|
Morii 11 小时 32 分钟前 2 Go 其实没大家想的那么快,而且做 WEB 开发心智负担有点大,还是适合写一些基础设施、中间件
|
zhangchongjie 11 小时 32 分钟前 说 js 差的,这个数据有点打脸了😂,现在不是 php 是最好的语言,现在是 python
|
zhuangzhuang1988 11 小时 23 分钟前 2 |
icyalala 11 小时 10 分钟前 @Leviathann @MakHoCheung
Swift 的安全特性,很多都是默认开启放在运行时的。比如 a + b 实际运行时会添加额外指令来检测 overflow 。 如果要考虑性能的话,至少要明白这点,比如 a + b 应该改为 a &+ b 来允许 overflow 。 这个测试代码很多都没考虑这点: https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/swift.html |
Chad0000 11 小时 6 分钟前 via iPhone 2 什么时候 C#打包的应用能和 Go 一样小就更 NB 了。
利益相关:C#程序员 |
cnoder 11 小时 5 分钟前 lua 应该没算 luajit 吧
|
svt 11 小时 2 分钟前 |
lujiaosama 11 小时 0 分钟前 nodejs 还挺快, 问题是 nodejs 也算语言??
|
wanacry 10 小时 56 分钟前 |
INCerry 10 小时 52 分钟前 3 @Chad0000 目前是可以做到, 有一个 reflection-free 选项,开启以后打包出来的只有几 MB
但是需要放弃很多特性(比如反射会弱的一批,动态加载没了,EMIT 代码生成没办法了-基本上很多 AOP ORM 框架都用不了了),写起来就跟直接用 Go 差不多了,很不爽。 https://github.com/dotnet/runtime/blob/main/src/coreclr/nativeaot/docs/reflection-free-mode.md |
ysc3839 10 小时 51 分钟前 via Android @MakHoCheung 编译成机器代码不代表中间运行时没有开销。比如 Objective-C 也是编译成机器代码的,但是对象间进行消息传递(类似别的语言的函数调用)要走 objc runtime 绕一圈,开销较大。
@snoopyhai 是觉得 Node.js 设计得不好吧,而不是底层引擎性能差。 @lujiaosama 准确说应该是 V8 引擎,除非这个测试涉及了网络部分。 |
Building 10 小时 42 分钟前 Swift 已经沉浸在各类语法糖中无法自拔,在稳定性上用点心好吗?
|
maclon 10 小时 33 分钟前 rust 超屌
|
cnnbboy 10 小时 33 分钟前 Swift 这么拉跨。。
|
roundgis 10 小时 24 分钟前 via Android 2 |
gimp 10 小时 22 分钟前 悲哉!我大 Python
|
Features 10 小时 11 分钟前 实际上 99.99%的人都不会遇到语言上的瓶颈
都是其他方面的 后端基本是 I/O 的,前端是 webview ,浏览器环境调优 客户端就海了去了,基本没有一个是语言本身带来的瓶颈 |
abersheeran 9 小时 53 分钟前 1 @qrobot 显然 discord 的这个业务是那 1%,你可以尝试去调查一下,有多少人开发的业务需要精细化到扣 GC 时间。绝大部分的业务甚至连 Python 的瓶颈都摸不到。更别提 Golang 了。
类似于 V2EX 甚至 Instagram 的 CRUD ,Python 就够用了。 |
greygoo 9 小时 53 分钟前 看看好玩就行了,没有什么参考性,性能都是要代价的
|
g190875565 9 小时 51 分钟前 |
qrobot 9 小时 49 分钟前 |
qrobot 9 小时 47 分钟前 @abersheeran 在补充一下 chromium 如果也是 1% 那么你说的百分之一占据的全世界的开发还是挺多的
|
abersheeran 9 小时 46 分钟前 1 @qrobot 💦给你说个反直觉的东西,Web 服务,php 的占有率高达 78.9%。这世界上的程序远比你想象的多。
|
abersheeran 9 小时 44 分钟前 @qrobot chromium 既然你提到这个,那你思考一下,是在 chromium 上面跑页面的业务多,还是开发 chromium 的多。
|
NeezerGu 9 小时 43 分钟前 如果这是跑分图,我大 python 秒天秒地 doge
|
qrobot 9 小时 43 分钟前 @abersheeran 实际上开发 chromium ,或者基于 chromium 开发出来的程序,比你想想中的多的多
|
Protocol 9 小时 41 分钟前 明明 C++是第一,而且 C#比 C++性能表现已经低了一倍,为什么那么多喊 C#牛逼的却没有喊 C++牛逼的?
|
abersheeran 9 小时 41 分钟前 @qrobot 嗯,我最近的活刚好就是有一部分涉及到 chromium 。你说是网站多,还是开发 chromium 的多?
|
qrobot 9 小时 35 分钟前 @abersheeran PHP 的占有率是百分之 78.9%, 这是原文,如果是这个去调查肯定不太准啊
这个调查结果是来着这里的对吧 https://w3techs.com/technologies Methodology When interpreting our surveys, you should know the following: We investigate technologies of websites, not of individual web pages. If we find a technology on any of the pages, it is considered to be used by the website. We include only the top 10 million websites (top 1 million before June 2013) in the statistics in order to limit the impact of domain spammers. We include all sites that are either in the Alexa top 10 million or in the Tranco top 1 million list. Website popularity rankings are sometimes considered inaccurate for measuring website traffic, but we find that they serve our purpose of providing a representative sample of established sites very well. The Alexa service retired on May 2022, but the ranking API will be operational until December 2022. We keep using Alexa for the time being, and we are working on alternatives. We exclude sites that have no useful content, e.g. sites that only show the default web server page. We also exclude sites that are essentially duplicates of other sites. We do not include redirected domains. For example, Sun.com redirects to Oracle.com, and is therefore not counted. We do not consider subdomains to be separate websites. For instance, sub1.example.com and sub2.example.com are considered to belong to the same site as example.com. That means for example, that all the subdomains of blogger.com, wordpress.com and similar sites are counted only as one website. We use the official part of the Public Suffix List to determine what exactly is a website. Because this differs a bit from Alexa's and Tranco's definition, the "top 10 million" websites are actually not exactly 10 million. However, this has no statistical significance. Our reports are updated daily. Please be aware of the limitations indicated in our disclaimer. |
qrobot 9 小时 34 分钟前 @abersheeran 开发 chromium 绝对不可能是只有 1%, 甚至开始说的 0.01% 是绝对不可能的
|
di1012 9 小时 28 分钟前 作为一个.netor 很欣慰
|
gbw1992 9 小时 24 分钟前 同样解释性语言,nodejs 和 python 为啥差这么多
|
zhangchongjie 9 小时 23 分钟前 @Protocol 因为 v 站用的人太少了吧
|
Mark24 9 小时 5 分钟前 |
cclin 9 小时 2 分钟前 via Android haskell 这么快我是没想到的
|
andrew2558 8 小时 48 分钟前 go 和 dart 这么差吗
|
andrew2558 8 小时 46 分钟前 dart 比 node.js 差是有点不理解
|
tramm 8 小时 46 分钟前 我记得 Java 性能能达到 C 的 70%左右的啊
|
bbqqddwhy 8 小时 44 分钟前 引战贴,坏人啊
|
aviator 8 小时 38 分钟前 不知道 java 有没有用到后端编译的 JIT
|
karatsuba 8 小时 29 分钟前 C++ + Python 哈哈哈
|
fgwmlhdkkkw 8 小时 24 分钟前 @zhangchongjie #42 这是 v8 强,js 就是垃圾啊
|
fgwmlhdkkkw 8 小时 23 分钟前 @gbw1992 #81 v8 有 jit ,python 没有。
|
GrayXu 8 小时 19 分钟前 话说 benchmark 具体的测试项目应该也影响不小吧。。这图里 Go 居然和 Java 差不多速度。。
|
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK