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/ce145b62-8c38-4808-b9fd-e69acb979292%40googlegroups.com.