4 ms·
JavaScript, Python, Lua, I don't see any dynamic language with good performances. Do you have examples?
by noname120 2y ago
JavaScript, Python, Lua, I don't see any dynamic language with good performances. Do you have examples?
- dkersten 2y agoLua with LuaJIT has pretty good performance. With that said, I spent today writing in C++, so I do agree with the overall sentiment.
- jart 2y agoThen normal Lua by itself would probably be fastest for you. Nothing makes me happier than writing native extensions for Lua. Its C API is such a pleasure to work with. With Python and JavaScript, writing native extensions is the worst most dismal toil imaginable, but with Lua it's like eating dessert. So if you know both Lua and C++ really well, then you're going to be a meat eating super programmer who builds things that go really fast.
- kukkamario 2y agoI prefer using Python with pybind11. It makes writing new modules or embedding the whole interpreter quite simple.
- metadat 2y ago"Good" compared to what? All the mentioned languages keep getting more performant year-over-year, but in the medium future scripting languages are unlikely to reach the performance levels of C, Rust or other low-level languages. Wouldn't it be amazing though? Maybe some combination of JIT and runtime static analysis could do it. Personally, I never assign different types to the same variable unless it's part of a union (e.g. string | HTMLObject | null, in JS). It would probably require getting rid of `eval' though, which I am fine with. On average, eval() tends to be naughty and those needs could be better met in other ways than blindly executing a string.
- BoingBoomTschak 2y agoCommon Lisp (SBCL)?
- bitwize 2y agoDon't forget Scheme (Gambit, Chez, Racket).
- BoingBoomTschak 2y agoThat's true, though I'd argue these are not as dynamic.
- EasyMark 2y agoJavascript is screamingly fast compared to the vast majority of other dynamic languages (scripting type, not something like Objective C). This is with the V8 engine of course. I’m not sure where you’re getting that it’s slow?
- jodrellblank 2y agohttps://bellard.org/jslinux https://bellard.org/jslinux has impressive performance. So has https://lrusso.github.io/Quake3/Quake3.htm https://lrusso.github.io/Quake3/Quake3.htm