in reply to Re: perl process slower and slower when loop number increase
in thread perl process slower and slower when loop number increase

>> If I had to guess, with my terrible understanding of PHP, I'd wonder if the empty block was optimized away in PHP

in first post I mention about "alioth benchmark game".

see in

perl vs php

https://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=perl&lang2=php

or

perl vs java

https://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=perl&lang2=php

it's maybe just "toy" or "game", but look at 1 example 'n-body' test, perl and php have similiar logic, and what make perl slow I thing the test need 50_000_000 loop and more loop in body of the test

  • Comment on Re^2: perl process slower and slower when loop number increase

Replies are listed 'Best First'.
Re^3: perl process slower and slower when loop number increase
by dave_the_m (Monsignor) on Jan 22, 2018 at 16:39 UTC
    Ok lets step back a bit. why are you surprised that php does better than perl in some benchmarks?

    Dave.

      no, it's not about PHP or perl vs XXXX

      it's about how to make perl loop faster, and back to first post,I think there is "magic setting" to increase this limitation

      see image provide by choroba above

        You are misinterpreting the graph: note that it has a logarithmic x-axis. Everything in this thread has shown that (subject to measurement noise), the execution time of this perl code:
        for ($i = 0; $i < N, $i++) {}
        increases linearly with N.

        For the purpose of focusing the discussion, do you (1) dispute that the relationship between time and N is linear, or (2) agree that it is linear, but wish it to be sub-linear?

        Dave.