in reply to Re^3: Run Perl 5 in the Browser!
in thread Run Perl 5 in the Browser!
A general approach for performance enhancements could be to run Perl your way and to replace time consuming inner functions with direct JS translations.(kind of JIT if you want).
Yep, although I think it would only speed things up where the Perl<->JavaScript interface is involved, I suspect everything that's pure Perl may even be as fast or even faster than regular JavaScript, since WebAssembly should be faster than JavaScript, and it's a WebAssembly perl binary. OTOH, at the moment I just want to use this for UI's, so as long as button clicks etc. don't cause 100% CPU or noticeable delays, I'm not going to worry too much about performance just yet.
From the Perl perspective these functions would have been monkey patched with XS code.
Yes, the interesting thing there is that "XS" code can include JavaScript code ;-) See WebPerl.xs, a mishmash of C, JS, and XS... (and my first real use of XS too!)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Run Perl 5 in the Browser! (JIT Compilation)
by LanX (Saint) on Aug 22, 2018 at 21:28 UTC | |
by chromatic (Archbishop) on Aug 22, 2018 at 23:16 UTC | |
by ikegami (Patriarch) on Aug 23, 2018 at 01:45 UTC | |
by chromatic (Archbishop) on Aug 23, 2018 at 17:59 UTC | |
by ikegami (Patriarch) on Aug 23, 2018 at 20:42 UTC | |
by LanX (Saint) on Aug 23, 2018 at 04:26 UTC | |
by ikegami (Patriarch) on Aug 23, 2018 at 20:39 UTC | |
| |
by LanX (Saint) on Aug 23, 2018 at 00:37 UTC | |
by haukex (Archbishop) on Aug 22, 2018 at 21:47 UTC | |
by LanX (Saint) on Aug 22, 2018 at 22:01 UTC | |
by haukex (Archbishop) on Aug 22, 2018 at 22:08 UTC | |
by LanX (Saint) on Aug 22, 2018 at 22:23 UTC |