http://www.perlmonks.org?node_id=777366


in reply to Re^2: new DLL compile code inside script languages
in thread new DLL compile code inside script languages

Listen roboticus, we are comparing brute-force approaches here...
  • Comment on Re^3: new DLL compile code inside script languages

Replies are listed 'Best First'.
Re^4: new DLL compile code inside script languages
by roboticus (Chancellor) on Jul 05, 2009 at 18:49 UTC
    Jorge de Burgos:

    True ... but I was just trying to illustrate that it's often the case that looking for a better algorithm is more productive than optimizing the current code.

    ...roboticus
Re^4: new DLL compile code inside script languages
by Porculus (Hermit) on Jul 06, 2009 at 19:51 UTC

    But that's not a very good thing to compare. What does it tell you? That C is faster than Perl for a very specific case of tight loops and integer arithmetic that is rendered totally moot by the existence of a trivial O(1) algorithm.

    What it doesn't tell you is whether Perl, Inline::C, PDL, or this VB-inspired DLL is a good choice for any real-world problem. It does not implement an interesting algorithm, so you can't compare which provides the most readable implementation; and it does not benchmark an interesting calculation, so you can't really compare performance either.