4 ms·
Webassembly looks like an upcoming standard for sandboxing efficient code on the server side as well. As it's well supported and it doesn't have a big startup r
by xiphias2 7y ago
Webassembly looks like an upcoming standard for sandboxing efficient code on the server side as well. As it's well supported and it doesn't have a big startup runtime cost, it looks like it has a real chance of success right now (after many failed ones in the last 25 years).
- londons_explore 7y agoWebassembly has a substantial performance hit for code containing hand-written vector loops using specialized instructions. Things like video encoders and decoders are much slower in webassembly.
- xiphias2 7y agoSIMD support is being worked on as far as I know, and this is a problem where there is room for a lot of improvement in the future. Generally interfacing between programming languages and systems efficiently, without too much data conversion/memory management is a harder problem than adding more low level programming support.
- throwaway483284 7y agoI don't think SIMD support will help here, a lot of encoder/decoder code base is hand written ASM.
- roblabla 7y agoThere's no reason to think it won't help - the encoder/decoder code base could be written in WASM directly to ensure it uses the SIMD instructions, and those will hopefully map closely to the machine SIMD instructions. Of course though, you're right that it'll still incur a performance penalty.
- londons_explore 7y agoSomeone needs to make a dev environment where someone can write WASM and see realtime the generated assembly instructions, together with the number of cycles to execute. That way, the developer can tweak the input to the compiler to get exactly the sequence of instructions they wanted. They can also hand write the output assembly, and put a patch in to the compiler saying "this generated assembly is faster that what you generated, so please generate this in the next version".
- snazz 7y agoYes, it looks like WASM SIMD has already shipped in V8. There are some impressive demos on this page: https://v8.dev/features/simd https://v8.dev/features/simd
- londons_explore 7y agoIt's kinda lame that none of those demos even run at 60fps, let alone 120fps on mobile for a real smooth experience, with lots of performance headroom for more than a single feature at once...
- tomrod 7y agoSounds like a good margin to focus on for a... Patent? What would IP in the spade be?
- AgentME 7y agoWouldn't patenting a performance optimization just work to prevent all browsers from adopting it?
- AnIdiotOnTheNet 7y agoPersonally I find that hard to believe until it gets some mechanism of actually being able to free memory back to the OS.
- jfkebwjsbx 7y agoWasm is too slow, and it is not different from other techniques that compile to an IR. It does not stop all kinds of issues, so it is not secure on its own either.