JIT JS for Odyssey
  • Order of the Butterfly
    Order of the Butterfly
    weiseb
    Posts: 210 from 2003/3/29
    I would like to know if there is any news about its progress.
    I cant wait to try it.

    http://morphos.pl/projekt.php?projekt=16
  • »14.04.14 - 05:29
    Profile
  • MorphOS Developer
    bigfoot
    Posts: 510 from 2003/4/11
    Unfortunately life got in the way of doing MorphOS stuff for a while, so everything has been pretty much on hold this year so far, however things are looking better now.

    I do realise that I'm way past my deadline already. I've dedicated this week to working on this project again, so hopefully by the end of this month I can finally show some progress.

    I'm sorry to have kept you all waiting for so long.
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »14.04.14 - 10:26
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    takemehomegrandma
    Posts: 2720 from 2003/2/24
    Quote:

    bigfoot wrote:
    Unfortunately life got in the way of doing MorphOS stuff for a while, so everything has been pretty much on hold this year so far, however things are looking better now.

    I do realise that I'm way past my deadline already. I've dedicated this week to working on this project again, so hopefully by the end of this month I can finally show some progress.

    I'm sorry to have kept you all waiting for so long.


    Thanks for the update!

    :-)
    MorphOS is Amiga done right! :-)
    MorphOS NG will be AROS done right! :-)
  • »14.04.14 - 10:56
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    weiseb
    Posts: 210 from 2003/3/29
    Yes, thanks for the update :)

    In the last couple of month I learned a bit too well myself how life can hate deadlines.
  • »14.04.14 - 17:13
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Jupp3
    Posts: 1193 from 2003/2/24
    From: Helsinki, Finland
    Quote:

    weiseb wrote:

    In the last couple of month I learned a bit too well myself how life can hate deadlines.

    Life loves deadlines. Especially the whooshing sound they make as they fly by. :-)
  • »14.04.14 - 21:36
    Profile Visit Website
  • MorphOS Developer
    bigfoot
    Posts: 510 from 2003/4/11
    Just an update to let you guys know that all the base work is done now. That is, all the required code is now written. What's remaining to do is then to debug the whole thing.

    Unfortunately it turns out that Webkit's JIT engine suffers from a number of endian related bugs that due to the nature of JIT are rather difficult to track down, so a fair amount of debugging work is required from here to get it to actually do anything useful.
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »27.04.14 - 15:19
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Intuition
    Posts: 1110 from 2013/5/24
    From: Nederland
    Quote:

    bigfoot wrote:
    Just an update to let you guys know that all the base work is done now. That is, all the required code is now written. What's remaining to do is then to debug the whole thing.

    Unfortunately it turns out that Webkit's JIT engine suffers from a number of endian related bugs that due to the nature of JIT are rather difficult to track down, so a fair amount of debugging work is required from here to get it to actually do anything useful.


    Thanks for the update Mark.

    I wish you the very best of British for the laborious task of debugging the thing. :)
    1.67GHz 15" PowerBook G4, 1GB RAM, 128MB Radeon 9700M Pro, 64GB SSD, MorphOS 3.15

    2.7GHz DP G5, 4GB RAM, 512MB Radeon X1950 Pro, 500GB SSHD, MorphOS 3.9
  • »27.04.14 - 17:35
    Profile
  • MorphOS Developer
    bigfoot
    Posts: 510 from 2003/4/11
    Unfortuantely it turned out that the Webkit endian issued ran deep into the design of the JIT engine, so getting the issues ironed out took quite a while longer than I had expected.

    The good news is that OWB+JIT is now successfully running simple Javascript programs as native PPC code. The bad news is that if I need to iron out every single endian issue, it'll take forever before I'm done. So my current plan is to try to leave some of the endian bugs intact, and instead work around them in the PPC specific part of the code. The advantage of doing it that way is that, if it works, it will take a lot less time to do. The disadvantage would be a negligible (probably less than 1%) performance loss.

    Here is a phone camera shot of the first Javascript test program that successfully ran through the JIT. It's a simple page with a counter on it that increments when you move the mouse over the counter.
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »13.05.14 - 09:07
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    boot_wb
    Posts: 874 from 2007/4/9
    From: Kingston upon ...
    Quote:

    bigfoot wrote:
    Unfortuantely it turned out that the Webkit endian issued ran deep into the design of the JIT engine, so getting the issues ironed out took quite a while longer than I had expected.

    The good news is that OWB+JIT is now successfully running simple Javascript programs as native PPC code. The bad news is that if I need to iron out every single endian issue, it'll take forever before I'm done. So my current plan is to try to leave some of the endian bugs intact, and instead work around them in the PPC specific part of the code. The advantage of doing it that way is that, if it works, it will take a lot less time to do. The disadvantage would be a negligible (probably less than 1%) performance loss.

    Here is a phone camera shot of the first Javascript test program that successfully ran through the JIT. It's a simple page with a counter on it that increments when you move the mouse over the counter.


    Sounds like you uncovered an ants nest. :-) Good to hear it's progressing, and look forward to seeing the benefits in Odyssey. Won't seperating out the workarounds help with (potential) future updates aswell?
    www.hullchimneyservices.co.uk

    UI: Powerbook 5,6 (1.67GHz, 128MB VRam): OS3.1, OSX 10.5.8
    HTPC: Mac Mini G4 (1,5GHz, 64MB VRam): OS3.1 (ZVNC)
    Audiophile: Efika 5200b (SB Audigy): OS3.1 (VNC + Virtual Monitor)

    Windows free since 2011!
  • »13.05.14 - 10:45
    Profile Visit Website
  • MorphOS Developer
    bigfoot
    Posts: 510 from 2003/4/11
    Quote:

    Won't seperating out the workarounds help with (potential) future updates aswell?


    Indeed, a smaller and less intrusive change set probably has a higher chance of being accepted by the upstream Webkit project, which in turn would mean less effort to update to newer versions of Webkit.

    I'm still working on my "new plan". Hopefully it will bear fruit within a few hours, and if it does, then things should progress rather rapidly from there. Fingers crossed :)
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »13.05.14 - 11:19
    Profile Visit Website
  • MorphOS Developer
    bigfoot
    Posts: 510 from 2003/4/11
    Quote:

    I'm still working on my "new plan". Hopefully it will bear fruit within a few hours, and if it does, then things should progress rather rapidly from there. Fingers crossed :)


    Unfortunately I ran into some hardware issues which slowed me down a bit, however I did manage to finish that code, and it's working as expected! Besides that I've managed to fix a few bugs related to flow control and floating point arithmetics, so calculating pi in Javascript now produces the correct result :)

    The goal for tomorrow is to have some simple graphical demos running. Fingers crossed!
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »13.05.14 - 23:32
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    boot_wb
    Posts: 874 from 2007/4/9
    From: Kingston upon ...
    Quote:

    bigfoot wrote:

    >I'm still working on my "new plan". Hopefully it will bear fruit within a few hours, and if it does, then things should progress rather rapidly from there. Fingers crossed :)

    Unfortunately I ran into some hardware issues which slowed me down a bit, however I did manage to finish that code, and it's working as expected!


    Great news! Hardware still suffering from the Pretorian climate?

    Quote:

    Besides that I've managed to fix a few bugs related to flow control and floating point arithmetics, so
    calculating pi in Javascript now produces the correct result :)


    Brave words!
    /me prepares ATan(Tan(pi/2)) test. :-D

    Quote:

    The goal for tomorrow is to have some simple graphical demos running. Fingers crossed!


    Wow.
    www.hullchimneyservices.co.uk

    UI: Powerbook 5,6 (1.67GHz, 128MB VRam): OS3.1, OSX 10.5.8
    HTPC: Mac Mini G4 (1,5GHz, 64MB VRam): OS3.1 (ZVNC)
    Audiophile: Efika 5200b (SB Audigy): OS3.1 (VNC + Virtual Monitor)

    Windows free since 2011!
  • »14.05.14 - 02:00
    Profile Visit Website
  • MorphOS Developer
    bigfoot
    Posts: 510 from 2003/4/11
    Quote:

    boot_wb wrote:
    Quote:

    bigfoot wrote:

    Unfortunately I ran into some hardware issues which slowed me down a bit, however I did manage to finish that code, and it's working as expected!


    Great news! Hardware still suffering from the Pretorian climate?


    Haha, where I am now, it's a nice 19 degrees celsius (66 fahrenheit). They call it "winter" :D

    Quote:

    Quote:

    Besides that I've managed to fix a few bugs related to flow control and floating point arithmetics, so
    calculating pi in Javascript now produces the correct result :)


    Brave words!
    /me prepares ATan(Tan(pi/2)) test. :-D


    Since both atan and tan would simply result in external function calls, this should work fine already :P However I'm probably missing a joke somewhere... ;)
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »14.05.14 - 11:25
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    boot_wb
    Posts: 874 from 2007/4/9
    From: Kingston upon ...
    Quote:

    bigfoot wrote:
    Quote:

    Great news! Hardware still suffering from the Pretorian climate?


    Haha, where I am now, it's a nice 19 degrees celsius (66 fahrenheit). They call it "winter" :D


    Scarf & gloves are optional then. :-D

    Quote:

    Quote:

    Brave words!
    /me prepares ATan(Tan(pi/2)) test.


    Since both atan and tan would simply result in external function calls, this should work fine already :P However I'm probably missing a joke somewhere... ;)


    Damn. Note to self: maths jokes are never funny. :P
    Tan(pi/2) approaches infinity at a steep curve, and as such is very dependent upon precise values of Pi. Reversing the function tends to show up any rounding errors of the value of pi used.
    www.hullchimneyservices.co.uk

    UI: Powerbook 5,6 (1.67GHz, 128MB VRam): OS3.1, OSX 10.5.8
    HTPC: Mac Mini G4 (1,5GHz, 64MB VRam): OS3.1 (ZVNC)
    Audiophile: Efika 5200b (SB Audigy): OS3.1 (VNC + Virtual Monitor)

    Windows free since 2011!
  • »14.05.14 - 12:13
    Profile Visit Website
  • MorphOS Developer
    bigfoot
    Posts: 510 from 2003/4/11
    Quote:

    boot_wb wrote:
    Quote:

    bigfoot wrote:

    Since both atan and tan would simply result in external function calls, this should work fine already :P However I'm probably missing a joke somewhere... ;)


    Damn. Note to self: maths jokes are never funny. :P
    Tan(pi/2) approaches infinity at a steep curve, and as such is very dependent upon precise values of Pi. Reversing the function tends to show up any rounding errors of the value of pi used.


    Well, it's still limited by the capabilities of IEEE double precision floats, so you won't get any better precision than what doing the equivalent in C would give you... Unless you find some big number Javascript library somewhere :)
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »14.05.14 - 12:25
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    ausPPC
    Posts: 543 from 2007/8/6
    From: Pending...
    I'm impressed with the work and the progress. This site might be good for testing the javascript capability (and handling some big numbers) http://brainwallet.org/
    PPC assembly ain't so bad... ;)
  • »14.05.14 - 21:23
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Intuition
    Posts: 1110 from 2013/5/24
    From: Nederland
    This might be a good test for your engine.

    http://peacekeeper.futuremark.com/
    1.67GHz 15" PowerBook G4, 1GB RAM, 128MB Radeon 9700M Pro, 64GB SSD, MorphOS 3.15

    2.7GHz DP G5, 4GB RAM, 512MB Radeon X1950 Pro, 500GB SSHD, MorphOS 3.9
  • »15.05.14 - 13:00
    Profile
  • MorphOS Developer
    bigfoot
    Posts: 510 from 2003/4/11
    OWB-JIT now renders mandelbrot correctly ;)
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »15.05.14 - 19:36
    Profile Visit Website
  • Leo
  • Order of the Butterfly
    Order of the Butterfly
    Leo
    Posts: 419 from 2003/8/18
    Quote:

    Nice! Any early benchmark compared to traditional interpreter ?
    Nothing hurts a project more than developers not taking the time to let their community know what is going on.
  • »15.05.14 - 20:21
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Yasu
    Posts: 1724 from 2012/3/22
    From: Stockholm, Sweden
    @bigfoot

    Great work! Can't wait to try it out!

    Benchmarks please :-D
    AMIGA FORUM - Hela Sveriges Amigatidning!
    AMIGA FORUM - Sweden's Amiga Magazine!

    My MorphOS blog
  • »15.05.14 - 21:30
    Profile Visit Website
  • MorphOS Developer
    bigfoot
    Posts: 510 from 2003/4/11
    It's a bit too early for real benchmarks, as my OWB is still full of debug output that slows things down considerably, but the Mandelbrot test I'm using seems to be somewhere in the region of 5 to 10 times as fast as the interpreter. But keep in mind that this is just the 'baseline JIT'. Webkit has another level of JIT called 'DFG' that promises further speedups through eliminating runtime type checking when possible, amongst other things.

    This graph was recently posted with the caption "Figure 3. Relative speed-up (higher is better) on the Richards benchmark from each of the three tiers." to a Webkit blog post. While this graph only demonstrates a specific benchmark on x86, it still gives an idea about what kind of speedups are possible.
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »16.05.14 - 09:29
    Profile Visit Website
  • MorphOS Developer
    cyfm
    Posts: 537 from 2003/4/11
    From: Germany
    The more interesting question will be if one has to restart Odyssey within minutes instead of hours due to WebKit/JS related memleaks anyway .... :)
  • »16.05.14 - 09:49
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Yasu
    Posts: 1724 from 2012/3/22
    From: Stockholm, Sweden
    @bigfoot

    Do you have any plans to eventually port DFG as well?
    AMIGA FORUM - Hela Sveriges Amigatidning!
    AMIGA FORUM - Sweden's Amiga Magazine!

    My MorphOS blog
  • »16.05.14 - 11:41
    Profile Visit Website
  • MorphOS Developer
    bigfoot
    Posts: 510 from 2003/4/11
    Quote:

    Yasu wrote:
    @bigfoot

    Do you have any plans to eventually port DFG as well?


    That's the plan, yes. But considering how deep into the design the reliance on little endian runs in Webkit's Javascript engine, I want to make sure the first level is working correctly before I go any further.
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »16.05.14 - 11:50
    Profile Visit Website