-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blog/on-javascript-performance-02/ #4
Comments
I think just.js can be a very strong data streaming & processing Javascript runtime engine; which current household name in that domain is kafka. With the ability to selectively build a static runtime, it may well be a practical JS engine on commercial embedded system (eg. instrument) as well. |
ho @gohmc. yes. i agree. 😀 if you are running on linux/x86_64 (with other architectures to come without huge amounts of work i think, arm64 as a priority for me) then this would be very good for low level streaming tools, with all the flexibility JS brings to the table. tbh, i don't see the need for higher level streams api's when you limit yourself to linux. there are perfectly good and simple low level abstractions for these things built in (file descriptors, a small handful of simple syscalls you need to know about, epoll for async, some flags for different socket and file options). you could learn most of what you need to know about the core pieces in a few days reading the man pages and experimenting or reading a few chapters of APUE. on top of that you get
from the tests i have done there is a significant edge over node.js in not having to go through the layers of JS and C++ in node.js streams abstractions and libuv so if 20% increase in throughput is important to you as well as the above it could be a good option. you could argue counter to that that it may be just as well to write a c++ binding for node.js for whatever it is you are doing but i think there may be a not insignificant number of people who might prefer just-js for various reasons. re. embedded i don't think it will be viable. for SBCs like raspberry pi and others on ARM it should be fine but for memory constrained devices and microcontrollers i don't think it would be possible to run v8. it might be possible to have a port or build option to build just-js using duktape or some other JS platform designed for memory constrained devices. this experiment from @indutny looks interesting and the perf is surprisingly good. sorry. i've gone off on a few tangents. i got excited. |
@billywhizz Is just-js able to run anything that compiles to nodejs? For example, could I compile a TypeScript app in NestJS down to something that would run on just-js? |
hi @SiavoshZarrasvand, no, there is no support for node.js api's currently and not really planning to support it. it would be possible wihtout a huge effort to create polyfills for some of the core node.js api's but it's not something i intend adding to core and would be something for others in the community to take on. happy to answer any questions aid the effort if there are people interested. |
Just(js): On Javascript Performance
A review of Javascript performance. Part 2 - Syscall Overhead in Javascript.
https://just.billywhizz.io/blog/on-javascript-performance-02/
The text was updated successfully, but these errors were encountered: