3 ms·
I'm always curious... why not port the original rather than use emscripten? Naively you should get better performance and maintainability... is it just a time s
by jheriko 13y ago
I'm always curious... why not port the original rather than use emscripten? Naively you should get better performance and maintainability... is it just a time saving thing?
- FrozenCow 13y agoI guess it saves you time developing and testing. It also makes you more confident the code actually works in production, since there is probably years of work behind existing libraries.
- jheriko 13y ago> there is probably years of work behind existing libraries this is often good thinking, but it is fallacious. for high performance or critical code i've found many situations where platform or ancient libraries or software have enormous bugs, memory leaks or are trivially outperformed memcpy is perhaps the best example of this, yes, memcpy... e.g. http://software.intel.com/en-us/articles/memcpy-performance http://software.intel.com/en-us/articles/memcpy-performance and skim reading that I already know how to outperform their implementation - even if its a tiny bit. (and no i'm not thinking cache hints which suddenly seem to be flavour of the month now that script kiddies have discovered them...), but i've also found bugs in increasing numbers over the years, the latest flavours of Microsoft madness (WinRT) is pretty leaky and hand tying whilst slowing you down - Objective-C/Cocoa Touch isn't far behind with overkill super generic late binding interfaces that spunk my performance up the wall and a reference counting system which has caused me more trouble than new and delete ever have... not to mention various bugs, especially with the wide character and unicode support in their c std lib... don't get me started on *nix - even make has a serious fail by using timestamps to detect changes! all code is made by progammers, most programmers are terrible, some are merely bad
- marcosscriven 13y agoActually Emscripten outputs a strict subset of JS dubbed asm.js. Using this allows some really significant speed improvements in execution, due to simplified type checking. My understanding then is that for certain things this could well be faster than a hand written Javascript port.
- Ravengenocide 13y agoasm.js can quite easily be optimized, but V8 is not yet optimized for it. So depending on the case it might run faster or slower depending on what JavaScript engine is running it.