1
INCerry Jun 27, 2022 C# yyds
|
2
dcsuibian Jun 27, 2022 知道 Python 慢,不过没想到有这么慢
|
3
liushuangbill Jun 27, 2022 Node.js 还挺快
|
4
v23x Jun 27, 2022
Rust the only true god
|
5
kerrspace Jun 27, 2022
有没有大佬来说一下 rust 替代 c++的前景
|
6
qrobot Jun 27, 2022
Java 不是性能取决于 JVM 么?
|
7
zmqiang Jun 27, 2022
看了两遍才发现图的左边和右边顺序不一样
|
8
min Jun 27, 2022 C#可以啊
|
9
icyalala Jun 27, 2022
这有另外一个更知名的: https://github.com/kostya/benchmarks
|
10
ragnaroks Jun 27, 2022
我虽然经常黑 java ,但是 java 不应该这么慢,最多落后 dotnet 两个身位,如果这个图是 dotnet 6 、java 11 那当我没说
|
11
Phishion Jun 27, 2022 python3 倒数第一几个意思?后面没有其他语言了?
|
12
INCerry Jun 27, 2022 @ragnaroks 看了下原链接 https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/csharp.html
C# .NET SDK 6.0.101 Java openjdk 18 2022-03-22 OpenJDK 64-Bit Server VM |
13
Leviathann Jun 27, 2022
swift 是不是最慢的 native 语言
|
14
mosfet Jun 27, 2022
我记得 C# JAVA GO 都差不多的,半斤八俩
|
16
ecnelises Jun 27, 2022 via iPhone
OCaml 的速度有点令人惊喜啊(虽然 Haskell 更快)。
Swift 直接毙了吧,背靠 LLVM 的静态语言搞成这样,不知道加入所有权后能提高多少。 |
17
MakHoCheung Jun 27, 2022
Swift 不是编译成二进制的吗,这么慢
|
18
bk201 Jun 27, 2022
java 的性能有这么差吗?
|
19
buxudashi Jun 27, 2022
lua 不是说很好吗?怎么连 PHP 都不如?
|
20
makelove Jun 27, 2022
我大 javascript 神一样的存在
|
21
nmap Jun 27, 2022
go 比起 c/c++/rust 还是差不少啊😥
|
22
liuxu Jun 27, 2022
@kerrspace C++不清楚,linux 内核下个版本 5.20 要合并 rust 的基础设施了,现在 5.19 ,https://www.phoronix.com/scan.php?page=news_item&px=Rust-For-Linux-5.20-Possible
|
24
ifdef Jun 27, 2022
我大 javascript 神一样的存在
|
25
Phishion Jun 27, 2022
@iyaozhen 但是我觉得上面好些已经是事实上的 dead 语言了,或者根本没什么人用,可见以 Python3 的使用人群来说,性能也不是什么问题。
|
26
ragnaroks Jun 27, 2022
@buxudashi lua 应该有两种用法,一个是基于 luajit 动态解析运行,一个是(开发游戏常用)直接编译成 lua.dll ,前者性能差到以为是网络卡了,后者应该在 c/c++ 的十倍以内
|
27
Cyshall Jun 27, 2022 c# 为什么这么屌?
|
28
princelai Jun 27, 2022
这个一年多前就讨论过了啊,我也画过图,https://www.0.51bbc.workers.dev/t/776893#reply51
另外 python 慢是因为他是用纯内置语言来实现算法,但实际上 python 除了调用 C++和 fortrain 写的东西外,在 numpy 和 numba 等技术加持下,python 写数值计算和算法并不慢,甚至能超过 90%的语言,我是没遇到过什么瓶颈。 |
29
luob Jun 27, 2022 基本符合日常经验,c/c++开了 o2 之后谁也打不过,go 和 java 一个水平,比 nodejs 快 30-40%,python 比主流语言慢两个数量级(
|
30
tabris17 Jun 27, 2022 壮哉!大 python
|
31
iyaozhen Jun 27, 2022
@Phishion 不是说人多就没有性能问题。
Python 主要是乘着 AI 的大船,不然使用量会少很多。这里说的是语音本身,但 Python 的特色是胶水语言和 C 紧密结合,这块大大提高了性能天花板 |
34
Mark24 Jun 27, 2022
ruby 可以开 JIT ,会再快一倍左右
|
35
damngood Jun 27, 2022
swift 和 go 的内存消耗指标很不错.
|
38
lolizeppelin Jun 27, 2022
erlang 居然只比 python2 好一点点?
|
39
snoopyhai Jun 27, 2022
印象中, deno 不是说因为 node 差, 才生出来的嘛. node 都在榜上, deno 上不了榜么?
|
41
28Sv0ngQfIE7Yloe Jun 27, 2022 Go 其实没大家想的那么快,而且做 WEB 开发心智负担有点大,还是适合写一些基础设施、中间件
|
42
zhangchongjie Jun 27, 2022
说 js 差的,这个数据有点打脸了😂,现在不是 php 是最好的语言,现在是 python
|
44
zhuangzhuang1988 Jun 27, 2022 C# 牛逼
|
45
icyalala Jun 27, 2022 @Leviathann @MakHoCheung
Swift 的安全特性,很多都是默认开启放在运行时的。比如 a + b 实际运行时会添加额外指令来检测 overflow 。 如果要考虑性能的话,至少要明白这点,比如 a + b 应该改为 a &+ b 来允许 overflow 。 这个测试代码很多都没考虑这点: https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/swift.html |
46
ktqFDx9m2Bvfq3y4 Jun 27, 2022 via iPhone 什么时候 C#打包的应用能和 Go 一样小就更 NB 了。
利益相关:C#程序员 |
47
cnoder Jun 27, 2022
lua 应该没算 luajit 吧
|
48
svt Jun 27, 2022
开打开打
|
49
lujiaosama Jun 27, 2022
nodejs 还挺快, 问题是 nodejs 也算语言??
|
50
wanacry Jun 27, 2022
没 js 吗
|
51
INCerry Jun 27, 2022 @Chad0000 目前是可以做到, 有一个 reflection-free 选项,开启以后打包出来的只有几 MB
但是需要放弃很多特性(比如反射会弱的一批,动态加载没了,EMIT 代码生成没办法了-基本上很多 AOP ORM 框架都用不了了),写起来就跟直接用 Go 差不多了,很不爽。 https://github.com/dotnet/runtime/blob/main/src/coreclr/nativeaot/docs/reflection-free-mode.md |
52
ysc3839 Jun 27, 2022 via Android
@MakHoCheung 编译成机器代码不代表中间运行时没有开销。比如 Objective-C 也是编译成机器代码的,但是对象间进行消息传递(类似别的语言的函数调用)要走 objc runtime 绕一圈,开销较大。
@snoopyhai 是觉得 Node.js 设计得不好吧,而不是底层引擎性能差。 @lujiaosama 准确说应该是 V8 引擎,除非这个测试涉及了网络部分。 |
53
Building Jun 27, 2022
Swift 已经沉浸在各类语法糖中无法自拔,在稳定性上用点心好吗?
|
54
maclon Jun 27, 2022
rust 超屌
|
55
cnnbboy Jun 27, 2022
Swift 这么拉跨。。
|
56
roundgis Jun 27, 2022 via Android |
57
gimp Jun 27, 2022
悲哉!我大 Python
|
58
Features Jun 27, 2022
实际上 99.99%的人都不会遇到语言上的瓶颈
都是其他方面的 后端基本是 I/O 的,前端是 webview ,浏览器环境调优 客户端就海了去了,基本没有一个是语言本身带来的瓶颈 |
60
qrobot Jun 27, 2022
|
61
abersheeran Jun 27, 2022 @qrobot 显然 discord 的这个业务是那 1%,你可以尝试去调查一下,有多少人开发的业务需要精细化到扣 GC 时间。绝大部分的业务甚至连 Python 的瓶颈都摸不到。更别提 Golang 了。
类似于 V2EX 甚至 Instagram 的 CRUD ,Python 就够用了。 |
62
greygoo Jun 27, 2022
看看好玩就行了,没有什么参考性,性能都是要代价的
|
63
oops0119 Jun 27, 2022
jsnb
|
64
qrobot Jun 27, 2022
|
65
qrobot Jun 27, 2022
@abersheeran 在补充一下 chromium 如果也是 1% 那么你说的百分之一占据的全世界的开发还是挺多的
|
66
abersheeran Jun 27, 2022 @qrobot 💦给你说个反直觉的东西,Web 服务,php 的占有率高达 78.9%。这世界上的程序远比你想象的多。
|
67
abersheeran Jun 27, 2022 @qrobot chromium 既然你提到这个,那你思考一下,是在 chromium 上面跑页面的业务多,还是开发 chromium 的多。
|
68
NeezerGu Jun 27, 2022
如果这是跑分图,我大 python 秒天秒地 doge
|
69
qrobot Jun 27, 2022
@abersheeran 实际上开发 chromium ,或者基于 chromium 开发出来的程序,比你想想中的多的多
|
71
Protocol Jun 27, 2022
明明 C++是第一,而且 C#比 C++性能表现已经低了一倍,为什么那么多喊 C#牛逼的却没有喊 C++牛逼的?
|
72
abersheeran Jun 27, 2022
@qrobot 嗯,我最近的活刚好就是有一部分涉及到 chromium 。你说是网站多,还是开发 chromium 的多?
|
73
qrobot Jun 27, 2022
@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. |
75
qrobot Jun 27, 2022
@abersheeran 开发 chromium 绝对不可能是只有 1%, 甚至开始说的 0.01% 是绝对不可能的
|
76
ktqFDx9m2Bvfq3y4 Jun 27, 2022
@INCerry
哇,发现了新天地。不过这部分确实用不着。用 C#就是图语法好性能也高工作也好找(国外)。 |
77
ktqFDx9m2Bvfq3y4 Jun 27, 2022
|
79
di1012 Jun 27, 2022
作为一个.netor 很欣慰
|
81
ltmst Jun 27, 2022
同样解释性语言,nodejs 和 python 为啥差这么多
|
82
zhangchongjie Jun 27, 2022
@Protocol 因为 v 站用的人太少了吧
|
86
Mark24 Jun 27, 2022
做过一个简单的
https://github.com/Mark24Code/fib-benchmark  |
88
Mark24 Jun 27, 2022
|
90
cclin Jun 27, 2022 via Android
haskell 这么快我是没想到的
|
91
andrew2558 Jun 27, 2022
go 和 dart 这么差吗
|
92
andrew2558 Jun 27, 2022
dart 比 node.js 差是有点不理解
|
93
tramm Jun 27, 2022
我记得 Java 性能能达到 C 的 70%左右的啊
|
94
bbqqddwhy Jun 27, 2022
引战贴,坏人啊
|
95
aviator Jun 27, 2022
不知道 java 有没有用到后端编译的 JIT
|
97
karatsuba Jun 27, 2022
C++ + Python 哈哈哈
|
98
fgwmlhdkkkw Jun 27, 2022
@zhangchongjie #42 这是 v8 强,js 就是垃圾啊
|
99
fgwmlhdkkkw Jun 27, 2022
@gbw1992 #81 v8 有 jit ,python 没有。
|
100
GrayXu Jun 27, 2022
话说 benchmark 具体的测试项目应该也影响不小吧。。这图里 Go 居然和 Java 差不多速度。。
|