Now mORMot can generate cross platform code for its clients!

Now mORMot can generate cross platform code for its clients!
Just one huge step forward for our Open Source framework!
:-)
http://blog.synopse.info/post/2014/08/11/CrossPlatform-Clients/Units-Platforms

Comments

  1. This blog doesn't seem to be in Delphi feeds, as it should!

    ReplyDelete
  2. Tommi Prami 
    Our blog was rejected once (don't know why), and now in the pending "Feedback" list since years. Sounds like if the site older do not take time in maintenance...
    But I still visit DelphiFeeds every day!
    :)

    ReplyDelete
  3. Been doing some tests for SHA256 when compiled in JS:

    http://jsperf.com/sha256/60

    while the code does a very good showing vs other "regular js" libraries, one implementation http://www.bichlmeier.info/sha256.js is much faster than the rest under Chrome (at least).

    Looking at their implementation, they seem to deviate a bit from your SHA256 implementation, using sigma functions instead and different loop counts...

    I wonder if that implementation couldn't be beneficial on other platforms as well?

    ReplyDelete
  4. Eric Grange AFAIK this is an unrolled version - which worked less well (in asm or native pascal) than our rolled optimized version. In fact, unrolling loop was a good idea 5 or 10 years ago, but modern CPU do make automatic microOps optimization during execution, which tends to make simple rolled loop faster. At least from what me measured.
    For JavaScript, sounds like if unrolled + typed arrays + asm.js is better. But the bichlmeier version shows that V8 is able to automatically inline sub functions very agressivelly.
    In our pascal version, we inlined the sigmas and logical operations. It does make sense for a pascal compiler with poor optimization, like Delphi.

    IMHO if our version gives the good results, and is fast enough, there is no need to optimize. As soon as we would have optimized for a particular JS VM, it may be worse on another, or after an update of the browser, it may slow down...

    What gave the best numbers was HW SHA-256 hashing, as I do in my 9€/month dedibox... its Via-Nano is faster than the latest Xeon for SHA-256. AFAIK there is no HW acceleration yet of SHA256 in Intel CPUs - only for AES - and CRC32e. A pity!

    ReplyDelete
  5. Actually asm.js version is not the fastest (it can be found in previous iterations), regular JS in V8 does just as well as FireFox does with asm.js, and bichlmeier in V8 just leaves everyone in its dust. I'm going to try and adapt it and see where it goes.

    Tight loops are a mixed bag in Delphi IME, because the compiler does not align loops or jump targets, so depending on build luck you can end up with a very fast aligned loop... or a completely misaligned one that will not be so fast. This is btw why in the Fastcode challenge some of the loop-sensitive implementations where copy-pasted several times, as it allowed to get an estimation of their sensitivity to alignment.

    ReplyDelete
  6. Eric Grange yes v8 is amazing.
    In Delphi we ask for alignment opcodes even in asm since years... And still need to write manual nop in our asm block.... So auto alignment at pascal compiler level is like a dream... :-(

    ReplyDelete

Post a Comment