Better HN
topnewbestaskshowjobs
Log inSign up

svaarala

15 karma · joined Dec 5, 2014 (11y ago) · 6 submissions

Submissions

comment 8y ago · link · parent

By default Duktape maintains the built-in objects purely in RAM, but for low footprint targets the built-in objects (and also custom user objects) can be made pure ROM objects which reduces memory usage quite a bit; the lowest startup RAM usage is around 1,5kB, see https://github.com/svaarala/duktape/blob/master/doc/low-memo....

comment 11y ago · link · parent

Very little performance work has been done so far. Most of the effort has been in E5 compliance and more recently to support low memory environments (96-128 kB system RAM) better. But there's going to be performance work early next year.

comment 11y ago · link · parent

These amount of flash/RAM are probably not realistic for a compliant engine. For instance, the Duktape regexp engine alone takes around 10kB flash compiled.

Luckily Javascript has a great ecosystem, so there are non-compliant subset engines targeting tiny devices. What other (higher level) language scales this way? :)

comment 11y ago · link · parent

Thanks! At the moment no, but send me an e-mail if you use Duktape somewhere :)

comment 11y ago · link · parent

Absolutely, the original motivation was to have a Lua-like implementation for Javascript.

comment 11y ago · link · parent

Around 200kB of code (flash), and around 25kB of RAM after startup, with low memory optimizations in the master branch (for the upcoming Duktape 1.1 release). This doesn't include User Javascript, just what Duktape needs to start up.

You can run Duktape with 128kB RAM, and to some extent with 96kB, see e.g.: http://www.slideshare.net/seoyounghwang77/js-onmicrocontroll...