Menu

Do you know this project?

2014-07-05
2014-07-11
  • egonzalez.ergio

    egonzalez.ergio - 2014-07-05
     
    • genom2

      genom2 - 2014-07-08

      Yes, I knew it. But - as far as I could see - it has nothing which inspired me for HaikuVM. (For some unknown reasons even source code is not accessable for me.)

       
  • egonzalez.ergio

    egonzalez.ergio - 2014-07-09
     
    • genom2

      genom2 - 2014-07-11

      Thank you for showing the access path to jwik. As stated in the jwik C code it's "... work based on NanoVM ...". I like the NanoVM as a ground breaking work. But it's a bit clumbsy to use. (So might be jwik.)

      In NanoVM you have to enable whole groups of bytecode by hand in C code if your JAVA program wants to use them. E.g. you have to #define:

      NVM_USE_FLOAT (vs. VM_INCLUDE_FLOAT in jwik)
      NVM_USE_EXTSTACKOPS (vs. VM_INCLUDE_EXTSTACKOPS in jwik)
      NVM_USE_ARRAY (vs. VM_INCLUDE_ARRAY in jwik)
      

      To mention only a few groups.
      In contrast HaikuVM (automatic) includes each single bytecode (only) if your program needs it. As a result HaikuVM tends to have a much smaller code footprint.

      NanoVM does only support about half of the official JAVA 6 bytecodes. (Missing real interesting ones like ATHROW, MONITORENTER, MONITOREXIT, MULTIANEWARRAY.)
      In contrast HaikuVM supports all JAVA 6 bytecodes.

      NanoVM does arithmetic e.g. 3+4*5 on the JAVA stack roughly like this:

      push(3); push(4); push(5); push(pop()*pop()); push(pop()+pop());
      

      In contrast HaikuVM uses a special C variable called top to mangage the top of stack. Arithmetic is done like this:

      push(3); push(4); top=5; top*=pop(); top+=pop()
      

      As a result HaikuVM needs less then half of stack operations. This and other optimizations lead to a speedup of factor 2.5.

      For jwik I like the document "JwiK™ vs. Arduino". I wish I could write documents clear and as easy to understand like this one.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.