Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

javascript vs lua

Name: Anonymous 2012-01-24 20:47

let's say i might be working on something ``secret'' and i want to embed a scripting language that isn't too off the wall for end users. i hear luajit is kinda fast and v8 is really fast and speed would be quite nice since user scripts might be called hundreds of thousands of times in short timeframes

i've heard javascript has better semantics and is generally more pleasant to use, but i want /prog/'s opinion so i don't fuck up and regret it later

Name: Anonymous 2012-02-19 6:09

I did the julialang.org perftest with luajit2.
$ luajit2 test.lua
luajit2,fib,0.21
luajit2,parse_int,0.53
luajit2,mandel,4.8
luajit2,quicksort,2.3
luajit2,pi_sum,34
luajit2,rand_mat_stat,110
luajit2,rand_mat_mul,16.84
$ node test.js
javascript,fib,0.242
javascript,parse_int,0.497
javascript,mandel,1.376
javascript,quicksort,3.08
javascript,pi_sum,32.2
javascript,rand_mat_stat,66
javascript,rand_mat_mul,62354


But I don't think this is valid, I've found things like 1 < x < 10, unused variables, arithmetic on undefined and NaN values...

Anyway, Luajit is quite on par with V8, but totally outperforms V8's rand_mat_mul time. With this, I can conclude that V8 is amazing, but it was really designed for the web, not as a scientific scripting language, and -- Lua, I choose you!

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List