News for hackers. Stuff that matters.
Re:Asm-Dom – WebAssembly Virtual DOM by DonHopkins on Saturday May 20, 2017 @04:54PM (#14384297)
I would guess a lot of the overhead would be thunking back and forth between webasm and js functions, so if you implemented the update in pure js where it can call directly into the DOM apis, and also read pointers, numbers and strings directly out of the webasm data array, then you could avoid any thunking between the two different worlds in the inner loop.

By thunking I mean doing this from C++ code:

    EM_ASM_({
        window['asmDomHelpers']['domApi']['appendChild']($0, $1);
    }, vnode->elm, createElm(vnode->children[i]));
Re:Asm-Dom – WebAssembly Virtual DOM by oever on Monday May 22, 2017 @10:35AM (#14393881)
So you propose to interface between C++ and JavaScript via a shared buffer and to eschew any explicit FFI calls.

If the data structure is lockless, that is doable.