On Tuesday, January 3, 2017 at 11:45:22 AM UTC-8, Charles Vaughn wrote:
>
> Do you have example code? Using emscripten::val with strings will have a 
> very high overhead in terms of moving strings into and out of the 
> Emscripten heap. If you're just looking at exposing large homogenous arrays 
> of int's/floats/doubles you can use ArrayBuffer based views into the 
> Emscripten heap.
>
> On Thursday, December 29, 2016 at 5:12:36 PM UTC-8, ExBigBoss wrote:
>>
>> So today I was writing an embound module and all it really did was set 
>> the i'th property of an emscripten::val with the i + 1'th value. This was 
>> done in a for-loop and in vanilla JS, I used simple for-loop with the 
>> native array and its push method.
>>
>> Basically, I just wanted to test how fast I could fill an array using 
>> Emscripten vs vanilla JS.
>>
>> However, I noticed that my code was 10x slower using emscripten::val! And 
>> this was done with the -O3 flag being set as well. Using the default 
>> wrapper around std::vector, I was able to generate asm that was 3x as fast 
>> as vanilla JS but unfortunately, it doesn't play well with the standard 
>> vector.
>>
>> I'm really just wondering, has anybody else noticed poor performance when 
>> Emscripten and external JS inter-operate with each other?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to