Hi.
I have big unordered_map in C++, like
std::unordered_map<uint32_t, MyObject>;
It contains more than
10 million elements, and i need
about 10 thousand hits to map from js.
What is the most productive way to pass it to JS?
1) I can add each item to v8 variable:
v8::Local<v8::Object> map;
map.Set(context, key, value);
But how productive it will be? And what type of v8::Object i must use? (v8::Object or v8::Map)?
2) I can use NamedProperty, but each access to map from js will call my c++ func. It's now slow?
And what kind of named properties should I must use in this variant? I see at least (SetAccessor, SetNamedPropertyHandler, SetHandler from v8::ObjectTemplate) and (SetAccessor, SetAccessorProperty, SetNativeDataProperty from v8::Object)