Heap Requirements

18 views
Skip to first unread message

Nitin Pasumarthy

unread,
Dec 19, 2016, 3:08:23 PM12/19/16
to v8-users
We are comparing lua and V8 and would like thoughts on heap requirements?

Our use case is to embed an engine inside a hardware device which can take a script and run it.

Nitin Pasumarthy

unread,
Dec 19, 2016, 3:09:38 PM12/19/16
to v8-users
We would like to have as minimal footprint and over head on device as our input scripts can be really simple expressions.

Ben Noordhuis

unread,
Dec 20, 2016, 5:10:35 AM12/20/16
to v8-users
On Mon, Dec 19, 2016 at 9:09 PM, Nitin Pasumarthy <nitha...@gmail.com> wrote:
> We would like to have as minimal footprint and over head on device as our
> input scripts can be really simple expressions.

V8 trades time for space, as a rule of thumb, so if you are looking to
minimize memory usage, V8 probably isn't for you.

A fresh VM instance consumes about 1-2 MB, depending on the
architecture and compiled-in features, and grows quickly once you move
beyond simple one-liners.

You can have multiple execution contexts per VM but each context still
takes up at least 400-800 kB and they can't run in parallel.
Reply all
Reply to author
Forward
0 new messages