Code Monkey home page Code Monkey logo

Comments (3)

lilydjwg avatar lilydjwg commented on May 26, 2024

代码本身没有可比性?你在开玩笑??

首先,本项目的代码非常具有可比性,它展现了在操作I/O、错误处理、字符串处理、简单计算方面不同编程语言是如何处理的。部分代码甚至提供了多线程的版本,来展现它们是如何处理多线程,而其执行时间又能减少多少(比如,如预期的,没一个是会因为跑了俩线程就只花之前一半的时间的)。

其次,本项目的解释器、编译器和运行时也具有可比性。它展现不同语言在 I/O 和字符串处理上的 overhead 是多么地不一样,有的语言做字符串处理的效率很糟糕,另一些语言在做 I/O 时还多了一堆其它的系统调用导致在内核状态的时间比其它的更长。另外有好几个语言本身的启动时间非常之长,表明它们不适合做这种跑一次就退出的任务。

再次,「大部分瓶颈都在系统io上」你是如何得出来的?除了排名前列的两三个语言,其它的都是用户态时间大于内核态的。

最后,本项目并不比较不同语言做纯计算/算法时的执行效率本项目根本就不是干那个的

from swapview-rosetta.

naixia avatar naixia commented on May 26, 2024

我一开始看你的那篇文章也吓一跳,java能比nodejs慢一倍。。。。
后来看到你的目的也就明白了,
不过,大部分系统中跑一次就退的任务很多并不太在乎性能,
所以有大量这样的任务还是用shell写的 :)

from swapview-rosetta.

lilydjwg avatar lilydjwg commented on May 26, 2024

嗯,如果用 shell 实现起来简单的话,不然就用 Python 这种语言了。Java 完全不适合这种任务的。
我博客也说了,我写这个只是学习新语言啦。当然别人写了其它语言版本我就收进来看看~

from swapview-rosetta.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.