惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Blog — PlanetScale
Blog — PlanetScale
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Last Watchdog
The Last Watchdog
AI
AI
Recent Announcements
Recent Announcements
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
J
Java Code Geeks
TaoSecurity Blog
TaoSecurity Blog
L
LangChain Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Project Zero
Project Zero
Microsoft Security Blog
Microsoft Security Blog
量子位
T
Threatpost
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园 - Franky
博客园 - 聂微东
L
LINUX DO - 最新话题
Security Archives - TechRepublic
Security Archives - TechRepublic
Hugging Face - Blog
Hugging Face - Blog
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
C
Check Point Blog
宝玉的分享
宝玉的分享
G
Google Developers Blog
Spread Privacy
Spread Privacy
Cloudbric
Cloudbric
SecWiki News
SecWiki News
有赞技术团队
有赞技术团队
www.infosecurity-magazine.com
www.infosecurity-magazine.com
W
WeLiveSecurity
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
美团技术团队
V
Vulnerabilities – Threatpost
Cyberwarzone
Cyberwarzone
A
Arctic Wolf
P
Privacy & Cybersecurity Law Blog
P
Palo Alto Networks Blog
H
Help Net Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Cisco Talos Blog
Cisco Talos Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
A
About on SuperTechFans
N
Netflix TechBlog - Medium
罗磊的独立博客
月光博客
月光博客

博客园 - 轮回

《Vibe Coding 入门宝典:非程序员的AI开发指南》一本改变软件生产方式的开源书 OpenAI API 百度文心大模型API测试 AI工具导航 一键生成dotnet5项目解决方案 倡议发起博客园#爷青回#挑战活动 1024快乐,加班使我快乐,福报如圣光醍醐灌顶! 记一次断电引起的mongodb彻底奔溃【转载】 dotnet core 3.0 swagger 显示枚举描述 dotnet core swagger filter 隐藏接口和显示枚举描述 dotnet core 项目脚手架这种小事嘛... .net core 2.2 EF oracle db first application.properties详解 --springBoot配置文件【转载】 以太坊客户端Geth命令用法-参数详解【转载】 CentOS7搭建以太坊私有链 【Java编码规范】《阿里巴巴Java开发手册(正式版)》【转载】 SSM框架——详细整合教程(Spring+SpringMVC+MyBatis)【转载】 Eclipse快捷键大全(转载) 在redis一致性hash(shard)中使用lua脚本的坑 如何评价微软Connect 2015?[转载]
不同语言的水仙花性能比较【Test1W】
轮回 · 2019-01-29 · via 博客园 - 轮回

看了大佬@鱼丸粗面一碗的文章:《这段代码,c 1秒,java 9秒,c# 14秒,而python。。。》,基于水仙花数的各种语言1W次性能比较,觉得很有意思。于是开启cv大法,把我有环境的各种语言都跑了一遍,包括C++,C#.Net,C#.Net Core2.2,VB.Net,VB.Net Core2.2,Java,Python,Javascript,Go,NodeJs。代码copy鱼丸的,在github上放了一份:https://github.com/dreign/Test1W

我的电脑信息如下:

基本硬件展示
处理器 英特尔 第四代酷睿 i3-4170 @ 3.70GHz 双核
主板 技嘉 H81M-S1
内存 16 GB ( 金士顿 DDR3 1600MHz )
主硬盘 OV-Blitz240GBSSD ( 240 GB / 固态硬盘 )
主显卡 AMD Radeon R5 230 ( 1 GB )
显示器 戴尔 DELA104 DELL E2418HN ( 24 英寸 )
网卡 瑞昱 RTL8168/8111/8112 Gigabit Ethernet Controller / 技嘉
声卡 英特尔 英特尔 显示器音频 @ 英特尔 Haswell 高保真音频

Linux环境使用了腾讯云的云主机:
腾讯云标准型S2 1 核 1 GB 1 Mbps 系统盘:高性能云硬盘
VPS:2.4 GHz 基准主频的 Intel Xeon E5-2680 Broadwell(v4)处理器,DDR4 内存

所有程序分别在win10和Linux环境下运行,测试的结果如下:

 

 

备注:c++ 在gcc -O 优化后,非常快,1亿次也才30ms


运行截图:
c++

C#.Net4.5

C#.Net Core 2.2

VB.Net4.5

VB.Net Core 2.2

Java

Python

JavaScript

NodeJs

Go