in reply to Re: OT: Converting some js to Perl
in thread OT: Converting some js to Perl

> js do not have inlining in c sense.

This pattern is so common and most JS engines do so many optimizations behind the scene, that it would really surprise me if this is not already handled .

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^3: OT: Converting some js to Perl
by Anonymous Monk on Feb 22, 2018 at 14:51 UTC
    Js programmers don't try to game engines. They strive go avoid engine quirks

        A speed optimization is not a "quirk". Compare asm.js for more insight.

        An exile from tribe martalec ? joined ncontex i see ? :)

        asm.js consists of a strict subset of the JavaScript language ... Almost all of the current applications based on asm.js are C/C++ applications compiled to asm.js using Emscripten or Mandreel. With that in mind, the kind of applications that are going to target asm.js in the near future are those that will benefit from the portability of running in a browser but which have a level of complexity for which a direct port to JavaScript would be infeasible...

        The OPs construct ain't got nothing with asm.js, and asm.js aint got nothing to do with 99.999% javascript programmers