Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Try writing a raytracer using a single thread, now try again with multiple threads working in tandem.

Trust me, I tried.



If you need that level of performance then JavaScript is the wrong tool for the job.

Node is mostly for request/response scenarios such as a web server or REST API server etc.


That's exactly what I'm trying to change. JavaScript should be the right tool for that level of performance. It has JIT compilers, now it needs concurrency, and it'll perform with the best of them.


Javascript has mostly web programmers as a community. I'm not sure they have the same mindset as people who normally try to wring out the most performance from their machines. Even QBasic programmers knew how to turn to machine code for more performance. Nowadays the culture is "megahertz are cheap". That is the kind of culture that leads to e.g. Microsoft making an IOT operating system for the PI that weighs half a gigabyte and does not do much. Or people thinking that a 1 Ghz system with 512MB of RAM is too slow and is only good for browsing the Web and a 300 MHz system with 128MB of RAM is useless nowadays. These were once called workstations back in the day.

If you're trying to push Javascript to its limits and make it comparable to C++, good for you. Just remember that JS has many flaws.If you're going down that road I'd much prefer you give the world a Turbo javascript that comes with an IDE like Turbo C and the requisite documentation that all fit on a single 1.44MB disk and which can compile to directly executable code that doesn't need any runtime.


For that specific problem you could use the upcoming addition to JS of SIMD for data parallelism while still in single threaded JS.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: