News for hackers. Stuff that matters.
Re:Writing an x86 emulator in JavaScript by mietek on Monday September 14, 2015 @08:55PM (#10218377)
Re:Writing an x86 emulator in JavaScript by jevinskie on Tuesday September 15, 2015 @04:54AM (#10219609)
https://github.com/copy/v86 has a MIT license.
Re:Writing an x86 emulator in JavaScript by aappleby on Monday September 14, 2015 @10:59PM (#10218755)
I know you're not too interested in performance here, but replacing DataView with a Uint8Array will probably get you a 10x+ win - DataView is extremely slow and V8 can't optimize calls to Program.getUint8(PC) in the same way that it can optimize Program[PC].
Re:Writing an x86 emulator in JavaScript by tadeuzagallo on Tuesday September 15, 2015 @02:37AM (#10219269)
Thanks, indeed I didn't make any efforts to make it faster, but this seems fair... I honestly didn't know DataView was that slow, it got fibonacci(40) down to 1m53s. Faster than PERL according to http://fengmk2.com/blog/2011/fibonacci/nodejs-python-php-rub...
Re:Writing an x86 emulator in JavaScript by benbristow on Monday September 14, 2015 @09:34PM (#10218531)
Writing an x86 emulator to run in javascript on an x86 machine. (although of course this would work on ARM etc. too).

Pretty cool though in all fairness.