*Tobias. Sorry I had the wrong name in mind when writing this :D

Am Dienstag, 5. Mai 2020 14:04:42 UTC+2 schrieb Immanuel Haffner:
>
> Hi Thomas,
>
> I started a related discussion in v8-dev 
> https://groups.google.com/forum/#!topic/v8-dev/jQMLH3EkCoM
> With the help of Clemens I managed to map host memory into a WebAssembly 
> module instance, so both host and VM work on the same memory. If this would 
> help you, I can attach the respective patch and the glue code for the wasm 
> module instance.
>
> Regards,
> Immanuel
>
> Am Montag, 4. Mai 2020 10:43:33 UTC+2 schrieb Tobias:
>>
>> Hi,
>>
>> I work on an application that processes different data streams and 
>> creates new ones. I want to try out whether V8 satisfies our needs with 
>> this, and now I'm searching for an efficient way to do this. The data is 
>> organized in records of different typed values, so a JS ArrayBuffer + some 
>> DataViews on it would be an option to extract the data from a record of the 
>> stream (and put it back for the output). But how do I get the data into V8 
>> most efficiently? The processing itself will be scheduled from the outside 
>> by calling the different JS methods depending on some event scheduling. The 
>> options that I'm currently considering are:
>>
>>
>>    1. create ArrayBuffers for each stream and memcpy on each new record 
>>    the data into the buffer when required. That would require 1 memcpy / 
>>    stream-record (read or written - doesn't matter)
>>    2. create an ArrayBuffer for each record and re-set the global 
>>    variable for it. That would eliminate the copying since I can point it to 
>>    the location where the data is located, but it would require V8 handle 
>>    manipulation all the time.
>>    3. create an accessor to the C++ record-streams that returns an array 
>>    buffer. Here my main problem is that I don't know how I can return an 
>>    array-buffer that points to already existing memory and return it so that 
>>    it's more efficent than number 2.
>>
>> Can someone give me some hints/pointers where I can look that up or give 
>> me some sample code? Any help would be appreciated.
>>
>> Regards
>> Tobias
>>
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/fc62c193-a88e-47b0-98a1-7ebb2afcf710%40googlegroups.com.

Reply via email to