--- Log opened Sat Nov 15 00:00:29 2014 | ||
poke53282 | Oh man. My dynamic recompilation code starts to look really messy. I mean really messy. And complicated. | 04:05 |
---|---|---|
poke53282 | http://pastie.org/9720367 | 04:09 |
olofk | poke53282: If you consider that messy, you don't want to see what I'm working on :) | 08:16 |
olofk | Does it work btw? Any speed improvements? | 08:16 |
poke53282 | olofk: Not really. | 16:59 |
poke53282 | http://pastie.org/9721342 | 16:59 |
poke53282 | This is a special case were it works more or less Ok. | 16:59 |
poke53282 | The fbdemo in my emulator. | 16:59 |
poke53282 | At the moment I work in blocks. From jump to jump. | 17:00 |
poke53282 | This is also the way how QEMU works. | 17:00 |
poke53282 | fbdemo is nice, because the major part are just logical operations and no jumps. | 17:02 |
poke53282 | The average length of such blocks is 6 instructions for -O2 compiled binaries. | 17:03 |
poke53282 | So in the normal case I get a speed reduction. And usually by a factor of 5-10 :( | 17:08 |
poke53282 | Chrome is the worst. IE is better. | 17:08 |
poke53282 | And in Firefox it works only if I remove the "use asm"; statement. | 17:09 |
poke53282 | Otherwise a speed gain of 4 will become a speed lost of a factor of 2. | 17:09 |
poke53282 | I guess, this is some overhead to go from normal Javascript to asm.js code and back. | 17:10 |
poke53282 | But there shoudn't be any overhead. | 17:11 |
poke53282 | All in all it looks like, that the current strategy does not work. I will implement the DTLB lookup directly in the generated code. Then I can omit one function call. | 17:12 |
poke53282 | I am also unsure whether such generated code is compiled or just interpreted. | 17:13 |
poke53282 | Again a lot of hidden complexity of the Javascript engines, which makes is so unpredictable. | 17:14 |
poke53282 | But at least one good message. Firefox crashed only once yesterday ;) | 17:14 |
poke53282 | To be successful with this dynamic recompilation, I have to increase the code size translated. That means including jumps. But on this level there are a lot of problems to solve. There is a reason why QEMU is not doing it directly. | 17:58 |
poke53282 | I guess in the end I have to recompile whole functions. | 17:59 |
poke53282 | But then Firefox might be a real rocket. | 18:01 |
poke53282 | I hope this reply was sufficient olofk ;) | 18:08 |
rooi-oog | why gnome sucks? | 19:47 |
-!- Netsplit *.net <-> *.split quits: rah, blueCmd, poke53282, knz_, fotis2, mithro, Amadiro | 20:05 | |
-!- rah_ is now known as rah | 21:29 | |
--- Log closed Sun Nov 16 00:00:30 2014 |
Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!