Giter Site home page Giter Site logo

yunfan / fibonacci36 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simplosophy/fibonacci36

1.0 2.0 0.0 87 KB

computation time of Fibonacci(36) using different programming languages

C 24.94% Ruby 13.28% Java 32.26% JavaScript 16.25% Python 13.28%

fibonacci36's Introduction

测试各种编程语言运行Fibonacci36所需的执行时间来衡量编程语言函数调用效率,其中Fibonacci函数要采用如下形式实现(不用通项公式。。。-_-!):
fib(n){
	if(n<2)
		return 1;
	else return fib(n-2)+fib(n-1);
}

可以使用time命令来测试运行时间,如time node fib.js 36

C、java等编译型语言需要自己先编译

归功与V8引擎,node.js表现很出色,测试结果合情理,但是也会出人意料。

困,碎觉去鸟。。。


PS: 我这里增加的 forth的实现 fib.4th

在我台式机上跑速度惊人,不过需要请原作者在原机器上跑一次

考虑到原作者的机器是mac 可以在这里下载 forth的环境 http://www.forth.com/swiftforth/version.html

fibonacci36's People

Contributors

simplosophy avatar yunfan avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar

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.