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