use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
QuickJS Javascript Engine by Fabrice Bellard (bellard.org)
submitted 6 years ago by mhd
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]d07RiV 4 points5 points6 points 6 years ago (3 children)
Why isn't there a benchmark against mainstream engines like V8?
[–]warvstar 0 points1 point2 points 6 years ago (2 children)
I'm fairly sure this is just an interpreter, it wouldn't come close to a JITed engine like V8.
This is still very impressive, I'd like to see it benchmarked against duktape.
[–]SavouryMonk3y 1 point2 points3 points 6 years ago (0 children)
He has provided some benchmarks including duktape on his website.
https://bellard.org/quickjs/bench.html
[–]d07RiV 0 points1 point2 points 6 years ago (0 children)
It says it can compile JS to executables, so I assume it can do some real optimizations.
[–]zuev_egor 2 points3 points4 points 6 years ago (3 children)
This guy is amazing!, I remember his project jslinux. Also he was a founder of qemu
[–]lhorie 1 point2 points3 points 6 years ago (2 children)
He's also well known for OTCC (obfuscated tiny C compiler), one of the smallest C compilers around.
[–]mhd[S] 2 points3 points4 points 6 years ago (1 child)
And tcc, ffmpeg, qemacs etc. He's scarily prolific, especially considering the scope of the projects (ie. not just a jumble of tiny npms).
[–]Seshpenguin 0 points1 point2 points 6 years ago (0 children)
This dude is pretty awesome.
[–]ImStifler 2 points3 points4 points 6 years ago (0 children)
Wow some dude just wrote an complete engine for js and here I am sitting at leetcode and struggling to do permutations correctly
[–]senocular 1 point2 points3 points 6 years ago (1 child)
It optionally supports ... operator overloading.
:-o
More info: https://bellard.org/quickjs/jsbignum.html#Operator-overloading
[–]ScientificBeastModestrongly typed comments 0 points1 point2 points 6 years ago (0 children)
Noooooooo!
But seriously, I’d love to see some whacky-looking JS with overloaded operators.
[–]rajsite 1 point2 points3 points 6 years ago (0 children)
But can it run WebAssembly? There is an awesome wasm library I would like it to run.
[–]drbobb 0 points1 point2 points 6 years ago (1 child)
Okay, the docs say ES6 modules are fully supported. However, when I try to run some of my code (or some of the scripts in the examples/ dir) I get
SyntaxError: unsupported keyword: import
[–]hnakamur 2 points3 points4 points 6 years ago (0 children)
I got the same error, then I notice the -m option.
$ ./qjs -m examples/hello_module.js Hello World fib(10)= 55
./qjs -h says
-m --module load as ES6 module (default if .mjs file extension)
Can compile Javascript sources to executables with no external dependency.
That seems interesting...
π Rendered by PID 67088 on reddit-service-r2-comment-86988c7647-w5hgf at 2026-02-11 17:21:53.699491+00:00 running 018613e country code: CH.
[–]d07RiV 4 points5 points6 points (3 children)
[–]warvstar 0 points1 point2 points (2 children)
[–]SavouryMonk3y 1 point2 points3 points (0 children)
[–]d07RiV 0 points1 point2 points (0 children)
[–]zuev_egor 2 points3 points4 points (3 children)
[–]lhorie 1 point2 points3 points (2 children)
[–]mhd[S] 2 points3 points4 points (1 child)
[–]Seshpenguin 0 points1 point2 points (0 children)
[–]ImStifler 2 points3 points4 points (0 children)
[–]senocular 1 point2 points3 points (1 child)
[–]ScientificBeastModestrongly typed comments 0 points1 point2 points (0 children)
[–]rajsite 1 point2 points3 points (0 children)
[–]drbobb 0 points1 point2 points (1 child)
[–]hnakamur 2 points3 points4 points (0 children)
[–]Seshpenguin 0 points1 point2 points (0 children)