logoalt Hacker News

floitsch • yesterday at 11:14 AM • 1 reply • view on HN

We looked at these when we started. The problem with them is that they weren't designed with constrained resources in mind and it shows. For example, objects are hash tables and method calls are thus expensive. An obligatory top level execution makes startup slow, ...

If you have a bigger machine you can optimize some of this (V8), but these optimizations typically need memory and/or a JIT. (And Python struggles to optimize even on stronger machines).

By starting from scratch (with what we learned from V8 and Dart) you can design something that feels similar but is much cleaner and faster to run.


Replies

Rohansi • yesterday at 7:20 PM

Those requirements are at odds with each other though. If you want to get the most out of MCU hardware you typically use C/C++/Rust, either as a whole or via a custom build of MicroPython/NodeMCU/Espruino. MicroPython has some interesting options for high performance code that you (optionally) run on your PC before deployment.

Besides that, there are other languages that have similar characteristics. Wren (https://wren.io/) is pretty nice but doesn't have type annotations or explicitly target embedded.