A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/yuin/gopher-lua/wiki/Benchmarks below:

Benchmarks · yuin/gopher-lua Wiki · GitHub

Machine: Windows7 64bit CPU:2, Memory:8GB

Go version: 1.7

Script languages implemented in pure Go

Other script languages

prog time anko 182.73s otto 173.32s go-lua 8.13s Python3.4 5.84s GopherLua 5.40s lua5.1.4 1.71s

fib.js

function fib(n) {
    if (n < 2) return n;
    return fib(n - 2) + fib(n - 1);
}

console.log(fib(35));
% time otto fib.js
9227465
otto fib.js  0.01s user 0.00s system 0% cpu 2:53.32 total

fib.ank

func fib(n) {
    if n < 2 {
      return n
    }
    return fib(n - 2) + fib(n - 1)
}

println(fib(35));
% time anko fib.ank
9227465
anko fib.ank  0.00s user 0.23s system 0% cpu 3:02.73 total

fib.lua

local function fib(n)
    if n < 2 then return n end
    return fib(n - 2) + fib(n - 1)
end

print(fib(35))
% time go-lua fib.lua
9227465
go-lua fib.lua  0.00s user 0.08s system 0% cpu 8.129 total

% time glua fib.lua
9227465
glua fib.lua  0.01s user 0.00s system 0% cpu 5.403 total

% lua -v
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
 % time lua fib.lua
9227465
lua fib.lua  0.00s user 0.00s system 0% cpu 1.714 total

fib.py

def fib(n)
    if n < 2:
      return n
    return fib(n - 2) + fib(n - 1)

print(fib(35))
% python34 --version
Python 3.4.3
 % time python34 fib.py
9227465
python34 fib.py  0.00s user 0.07s system 1% cpu 5.846 total

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4