Comments (3)
代码本身没有可比性?你在开玩笑??
首先,本项目的代码非常具有可比性,它展现了在操作I/O、错误处理、字符串处理、简单计算方面不同编程语言是如何处理的。部分代码甚至提供了多线程的版本,来展现它们是如何处理多线程,而其执行时间又能减少多少(比如,如预期的,没一个是会因为跑了俩线程就只花之前一半的时间的)。
其次,本项目的解释器、编译器和运行时也具有可比性。它展现不同语言在 I/O 和字符串处理上的 overhead 是多么地不一样,有的语言做字符串处理的效率很糟糕,另一些语言在做 I/O 时还多了一堆其它的系统调用导致在内核状态的时间比其它的更长。另外有好几个语言本身的启动时间非常之长,表明它们不适合做这种跑一次就退出的任务。
再次,「大部分瓶颈都在系统io上」你是如何得出来的?除了排名前列的两三个语言,其它的都是用户态时间大于内核态的。
最后,本项目并不比较不同语言做纯计算/算法时的执行效率。本项目根本就不是干那个的。
from swapview-rosetta.
我一开始看你的那篇文章也吓一跳,java能比nodejs慢一倍。。。。
后来看到你的目的也就明白了,
不过,大部分系统中跑一次就退的任务很多并不太在乎性能,
所以有大量这样的任务还是用shell写的 :)
from swapview-rosetta.
嗯,如果用 shell 实现起来简单的话,不然就用 Python 这种语言了。Java 完全不适合这种任务的。
我博客也说了,我写这个只是学习新语言啦。当然别人写了其它语言版本我就收进来看看~
from swapview-rosetta.
Related Issues (20)
- Swift version?
- ChezScheme version? HOT 1
- About the project HOT 1
- Julia: need update HOT 1
- different implementation and output for size
- [bug] Go_goroutine 版本 goroutine 同步问题 HOT 1
- Nim: cmdline for Google Chrome is truncated one character at the end
- Inaccurate results for size
- chop last null byte HOT 4
- Lua51: file reading stops at null byte?
- 不知道J语言能不能实现这个? HOT 1
- sort.Slice(slist, func(i, j int) HOT 1
- 依云姐姐更新下结果表呗?一年过去了 HOT 1
- c++17: need parallel <execution> example HOT 1
- Stable releases? HOT 3
- Racket:The string-starts-with? procedure is not necessary. HOT 2
- How to set environment variables in the TOML file? HOT 2
- Bash: exit on error (-e) HOT 1
- Parallel D swapview HOT 1
- try Rubinius
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swapview-rosetta.